diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2015-07-16 15:03:36 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2015-07-16 15:03:36 +0000 |
commit | 07f347ee0763327978f7e57484851d451068871e (patch) | |
tree | 288bc3785537bce1bfc4a1024eecc5e4a8e02942 | |
parent | a4a953a7b9252757346ba945169ea098751f6bfe (diff) |
kill leak, found by coverity, ID 105348
ok miod@
-rw-r--r-- | usr.bin/openssl/apps.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/openssl/apps.c b/usr.bin/openssl/apps.c index 586b3c624aa..16b76ae346f 100644 --- a/usr.bin/openssl/apps.c +++ b/usr.bin/openssl/apps.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apps.c,v 1.28 2015/07/15 13:54:34 jsing Exp $ */ +/* $OpenBSD: apps.c,v 1.29 2015/07/16 15:03:35 beck Exp $ */ /* * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> * @@ -2027,8 +2027,10 @@ args_verify(char ***pargs, int *pargc, int *badarg, BIO *err, *badarg = 1; goto end; } - if (otmp) + if (otmp) { X509_VERIFY_PARAM_add0_policy(*pm, otmp); + otmp = NULL; + } if (flags) X509_VERIFY_PARAM_set_flags(*pm, flags); @@ -2047,6 +2049,7 @@ end: if (pargc) *pargc -= *pargs - oldargs; + ASN1_OBJECT_free(otmp); return 1; } |