From: Tobias Brunner Date: Wed, 19 Apr 2017 16:56:43 +0000 (+0200) Subject: pki: Reset variable so error handling works properly X-Git-Tag: 5.5.3dr1~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=069bf10d3fd18c646a7d7419f1c102d762b30752;p=thirdparty%2Fstrongswan.git pki: Reset variable so error handling works properly If we jump to `end` without this we crash (not necessarily visibly) due to a double free and the actual error message is not printed. --- diff --git a/src/pki/commands/issue.c b/src/pki/commands/issue.c index b0399c78b7..e41c56d081 100644 --- a/src/pki/commands/issue.c +++ b/src/pki/commands/issue.c @@ -406,6 +406,7 @@ static int issue() goto end; } public->destroy(public); + public = NULL; if (hex) {