summaryrefslogtreecommitdiff
path: root/lib/libcrypto/x509v3
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2014-07-10 21:57:21 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2014-07-10 21:57:21 +0000
commit2c520f8ed58b2a47e7b06b09ba94c2ee5acdbd5f (patch)
treee452fa7bc8f13e6326e27efe249448ba17829bd0 /lib/libcrypto/x509v3
parent8aff499630aa4405aba2260ba70a57efefcb8af0 (diff)
Upon realloc() failure, free() the original pointer and remove the stupid
comments implying you don't have to. ok tedu@
Diffstat (limited to 'lib/libcrypto/x509v3')
-rw-r--r--lib/libcrypto/x509v3/v3_pci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libcrypto/x509v3/v3_pci.c b/lib/libcrypto/x509v3/v3_pci.c
index 34a34a6fccf..56b955c9c38 100644
--- a/lib/libcrypto/x509v3/v3_pci.c
+++ b/lib/libcrypto/x509v3/v3_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: v3_pci.c,v 1.6 2014/07/10 13:58:23 jsing Exp $ */
+/* $OpenBSD: v3_pci.c,v 1.7 2014/07/10 21:57:20 miod Exp $ */
/* Contributed to the OpenSSL Project 2004
* by Richard Levitte (richard@levitte.org)
*/
@@ -141,7 +141,7 @@ process_pci_value(CONF_VALUE *val, ASN1_OBJECT **language,
(*policy)->data[(*policy)->length] = '\0';
} else {
free(tmp_data2);
- /* realloc failure implies the original data space is b0rked too! */
+ free((*policy)->data);
(*policy)->data = NULL;
(*policy)->length = 0;
X509V3err(X509V3_F_PROCESS_PCI_VALUE,
@@ -198,7 +198,7 @@ process_pci_value(CONF_VALUE *val, ASN1_OBJECT **language,
(*policy)->length += val_len;
(*policy)->data[(*policy)->length] = '\0';
} else {
- /* realloc failure implies the original data space is b0rked too! */
+ free((*policy)->data);
(*policy)->data = NULL;
(*policy)->length = 0;
X509V3err(X509V3_F_PROCESS_PCI_VALUE,