summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src/apps/engine.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2014-05-19 12:13:30 +0000
committerjsing <jsing@openbsd.org>2014-05-19 12:13:30 +0000
commit7dc304aadc7dce4fbb9a8f3931d77cdca7c65042 (patch)
treece3a0778eb14bd880d642ec9fc70ef52c8126c0f /lib/libssl/src/apps/engine.c
parentNuke some trailing whitespace that snuck in. (diff)
downloadwireguard-openbsd-7dc304aadc7dce4fbb9a8f3931d77cdca7c65042.tar.xz
wireguard-openbsd-7dc304aadc7dce4fbb9a8f3931d77cdca7c65042.zip
It is perfectly valid to call free(NULL), so stop checking for non-NULL
before calling free - of some course parts of the code already did this.
Diffstat (limited to 'lib/libssl/src/apps/engine.c')
-rw-r--r--lib/libssl/src/apps/engine.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/libssl/src/apps/engine.c b/lib/libssl/src/apps/engine.c
index 2cf7bd2412e..07d69263d0c 100644
--- a/lib/libssl/src/apps/engine.c
+++ b/lib/libssl/src/apps/engine.c
@@ -259,10 +259,9 @@ util_verbose(ENGINE * e, int verbose, BIO * bio_out, const char *indent)
}
free(name);
name = NULL;
- if (desc) {
- free(desc);
- desc = NULL;
- }
+ free(desc);
+ desc = NULL;
+
/* Move to the next command */
num = ENGINE_ctrl(e, ENGINE_CTRL_GET_NEXT_CMD_TYPE,
num, NULL, NULL);
@@ -273,10 +272,8 @@ util_verbose(ENGINE * e, int verbose, BIO * bio_out, const char *indent)
err:
if (cmds)
sk_OPENSSL_STRING_pop_free(cmds, identity);
- if (name)
- free(name);
- if (desc)
- free(desc);
+ free(name);
+ free(desc);
return ret;
}