summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/asn1_lib.c
diff options
context:
space:
mode:
authortedu <>2014-05-30 02:52:11 +0000
committertedu <>2014-05-30 02:52:11 +0000
commit9598b4272312fc9b55154e675c1adb3a21b491b3 (patch)
treea802460259115af2ecf6be49736b1b6a09173232 /src/lib/libcrypto/asn1/asn1_lib.c
parent50df74c1961eaed1e88ea9c7bb4cfcab77d75043 (diff)
downloadopenbsd-9598b4272312fc9b55154e675c1adb3a21b491b3.tar.gz
openbsd-9598b4272312fc9b55154e675c1adb3a21b491b3.tar.bz2
openbsd-9598b4272312fc9b55154e675c1adb3a21b491b3.zip
no need for null check before free. from Brendan MacDonell
Diffstat (limited to 'src/lib/libcrypto/asn1/asn1_lib.c')
-rw-r--r--src/lib/libcrypto/asn1/asn1_lib.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/libcrypto/asn1/asn1_lib.c b/src/lib/libcrypto/asn1/asn1_lib.c
index c2f0837a1c..b28cdc56cf 100644
--- a/src/lib/libcrypto/asn1/asn1_lib.c
+++ b/src/lib/libcrypto/asn1/asn1_lib.c
@@ -401,8 +401,7 @@ ASN1_STRING_set(ASN1_STRING *str, const void *_data, int len)
401void 401void
402ASN1_STRING_set0(ASN1_STRING *str, void *data, int len) 402ASN1_STRING_set0(ASN1_STRING *str, void *data, int len)
403{ 403{
404 if (str->data) 404 free(str->data);
405 free(str->data);
406 str->data = data; 405 str->data = data;
407 str->length = len; 406 str->length = len;
408} 407}