gcrypt: Always initialize result pointer.
[paraslash.git] / gcrypt.c
index 45a1c67..63f8fff 100644 (file)
--- a/gcrypt.c
+++ b/gcrypt.c
@@ -212,7 +212,7 @@ static int decode_key(const char *key_file, const char *header_str,
 
        ret = mmap_full_file(key_file, O_RDONLY, &map, &map_size, NULL);
        if (ret < 0)
-               return ret;
+               goto out;
        ret = -E_KEY_MARKER;
        if (strncmp(map, header_str, strlen(header_str)))
                goto unmap;
@@ -257,6 +257,7 @@ unmap:
                free(blob);
                blob = NULL;
        }
+out:
        *result = blob;
        return ret;
 }