From 07f347ee0763327978f7e57484851d451068871e Mon Sep 17 00:00:00 2001 From: Bob Beck Date: Thu, 16 Jul 2015 15:03:36 +0000 Subject: kill leak, found by coverity, ID 105348 ok miod@ --- usr.bin/openssl/apps.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'usr.bin') 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 * @@ -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; } -- cgit v1.2.3