summaryrefslogtreecommitdiffstats
path: root/apps/x509.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-08-24 11:22:47 +0100
committerMatt Caswell <matt@openssl.org>2016-08-24 11:22:47 +0100
commit08f6ae5b2896a22e1e16de3e363d1ea314700b0b (patch)
tree97d2c6f63c58d127ee059da8fd326a551cd1bc69 /apps/x509.c
parentc74aea8d6ccdf07ce826a9451887739b8aa64096 (diff)
Fix some resource leaks in the apps
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'apps/x509.c')
-rw-r--r--apps/x509.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/x509.c b/apps/x509.c
index 05aa5547cd..9e5101259f 100644
--- a/apps/x509.c
+++ b/apps/x509.c
@@ -261,6 +261,10 @@ int x509_main(int argc, char **argv)
CAserial = opt_arg();
break;
case OPT_SET_SERIAL:
+ if (sno != NULL) {
+ /* Cannot be supplied twice */
+ goto opthelp;
+ }
if ((sno = s2i_ASN1_INTEGER(NULL, opt_arg())) == NULL)
goto opthelp;
break;