]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
pki: Reset variable so error handling works properly
authorTobias Brunner <tobias@strongswan.org>
Wed, 19 Apr 2017 16:56:43 +0000 (18:56 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 19 Apr 2017 16:56:43 +0000 (18:56 +0200)
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.

src/pki/commands/issue.c

index b0399c78b7e9174bbec345f469d3243c0e77d32c..e41c56d081349004512cbf8aefc49352f5cd1685 100644 (file)
@@ -406,6 +406,7 @@ static int issue()
                goto end;
        }
        public->destroy(public);
+       public = NULL;
 
        if (hex)
        {