summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libssl/src')
-rw-r--r--lib/libssl/src/crypto/x509/x509_att.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libssl/src/crypto/x509/x509_att.c b/lib/libssl/src/crypto/x509/x509_att.c
index 4ae7504caef..e3acc18ed14 100644
--- a/lib/libssl/src/crypto/x509/x509_att.c
+++ b/lib/libssl/src/crypto/x509/x509_att.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509_att.c,v 1.11 2014/07/11 08:44:49 jsing Exp $ */
+/* $OpenBSD: x509_att.c,v 1.12 2014/09/26 19:30:38 miod Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -140,7 +140,7 @@ X509at_add1_attr(STACK_OF(X509_ATTRIBUTE) **x, X509_ATTRIBUTE *attr)
if ((sk = sk_X509_ATTRIBUTE_new_null()) == NULL)
goto err;
} else
- sk= *x;
+ sk = *x;
if ((new_attr = X509_ATTRIBUTE_dup(attr)) == NULL)
goto err2;
@@ -155,7 +155,7 @@ err:
err2:
if (new_attr != NULL)
X509_ATTRIBUTE_free(new_attr);
- if (sk != NULL)
+ if (sk != NULL && sk != *x)
sk_X509_ATTRIBUTE_free(sk);
return (NULL);
}