From 6f4d6461c56d882eecea37a2948d1ed154d1e4f4 Mon Sep 17 00:00:00 2001 From: beck <> Date: Sat, 18 Jul 2015 00:01:05 +0000 Subject: Fix leak found by coverity, issue 78897 - which also brough to light that the child counting was broken in the original code. this is still fugly, but this preserves all the existing goo. ok doug@ --- src/lib/libcrypto/x509v3/pcy_int.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/libcrypto/x509v3/pcy_int.h') diff --git a/src/lib/libcrypto/x509v3/pcy_int.h b/src/lib/libcrypto/x509v3/pcy_int.h index 3f8a8316e2..50ed7cbfcf 100644 --- a/src/lib/libcrypto/x509v3/pcy_int.h +++ b/src/lib/libcrypto/x509v3/pcy_int.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pcy_int.h,v 1.3 2014/06/12 15:49:31 deraadt Exp $ */ +/* $OpenBSD: pcy_int.h,v 1.4 2015/07/18 00:01:05 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2004. */ @@ -196,9 +196,9 @@ X509_POLICY_NODE *level_find_node(const X509_POLICY_LEVEL *level, X509_POLICY_NODE *tree_find_sk(STACK_OF(X509_POLICY_NODE) *sk, const ASN1_OBJECT *id); -X509_POLICY_NODE *level_add_node(X509_POLICY_LEVEL *level, +int level_add_node(X509_POLICY_LEVEL *level, const X509_POLICY_DATA *data, X509_POLICY_NODE *parent, - X509_POLICY_TREE *tree); + X509_POLICY_TREE *tree, X509_POLICY_NODE **nodep); void policy_node_free(X509_POLICY_NODE *node); int policy_node_match(const X509_POLICY_LEVEL *lvl, const X509_POLICY_NODE *node, const ASN1_OBJECT *oid); -- cgit v1.2.3-55-g6feb