]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
A few more missing frees.
authorSimon Tatham <anakin@pobox.com>
Wed, 15 Feb 2017 05:31:51 +0000 (05:31 +0000)
committerSimon Tatham <anakin@pobox.com>
Wed, 15 Feb 2017 05:47:16 +0000 (05:47 +0000)
Naturally I didn't quite manage to catch _everything_ Coverity
reported to me in my first pass through the results.

pageant.c

index e7430e7865faac93a173f15ede19442d76ea54cf..2d9a740236739923800f4d2cfc79a540302c5fdb 100644 (file)
--- a/pageant.c
+++ b/pageant.c
@@ -1313,11 +1313,15 @@ int pageant_add_keyfile(Filename *filename, const char *passphrase,
        if (keylist) {
            if (keylistlen < 4) {
                *retstr = dupstr("Received broken key list from agent");
+                sfree(keylist);
+                sfree(blob);
                return PAGEANT_ACTION_FAILURE;
            }
            nkeys = toint(GET_32BIT(keylist));
            if (nkeys < 0) {
                *retstr = dupstr("Received broken key list from agent");
+                sfree(keylist);
+                sfree(blob);
                return PAGEANT_ACTION_FAILURE;
            }
            p = keylist + 4;