Remove NULL checks before X509_{REQ,NAME}_free() and zap an unnecessary
authortb <tb@openbsd.org>
Sun, 29 Jul 2018 20:22:02 +0000 (20:22 +0000)
committertb <tb@openbsd.org>
Sun, 29 Jul 2018 20:22:02 +0000 (20:22 +0000)
pair of parens.

From Ross L. Richardson

usr.sbin/acme-client/keyproc.c

index 6551a03..1d18bde 100644 (file)
@@ -1,4 +1,4 @@
-/*     $Id: keyproc.c,v 1.10 2018/07/28 15:25:23 tb Exp $ */
+/*     $Id: keyproc.c,v 1.11 2018/07/29 20:22:02 tb Exp $ */
 /*
  * Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv>
  *
@@ -252,12 +252,10 @@ out:
        free(der64);
        free(sans);
        free(san);
-       if (x != NULL)
-               X509_REQ_free(x);
-       if (name != NULL)
-               X509_NAME_free(name);
+       X509_REQ_free(x);
+       X509_NAME_free(name);
        EVP_PKEY_free(pkey);
        ERR_print_errors_fp(stderr);
        ERR_free_strings();
-       return (rc);
+       return rc;
 }