]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - crypt.c
server: Fix brown paper bag bug in generic_com_on().
[paraslash.git] / crypt.c
diff --git a/crypt.c b/crypt.c
index 2af3fd7e1c17a03ce715e950e2b82d7fae1277c1..b8a587cd0e55114f1ced030d5284adcd2d4a96b4 100644 (file)
--- a/crypt.c
+++ b/crypt.c
@@ -154,8 +154,8 @@ int get_public_key(const char *key_file, struct asymmetric_key **result)
                goto out;
        ret = is_ssh_rsa_key(map, map_size);
        if (!ret) {
-               para_munmap(map, map_size);
-               return -E_SSH_PARSE;
+               ret = -E_SSH_PARSE;
+               goto out_unmap;
        }
        cp = map + ret;
        encoded_size = map_size - ret;