From bbceab593967f4ef9e572b15d59f8936bd1040b1 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Mon, 20 Feb 2017 16:41:49 +0100 Subject: [PATCH] mount.ceph.c: fix resource leak Addressed issue: CID 1219611 (#1 of 1): Resource leak (RESOURCE_LEAK) leaked_storage: Variable saw_name going out of scope leaks the storage it points to. Signed-off-by: Danny Al-Gaaf --- src/mount/mount.ceph.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mount/mount.ceph.c b/src/mount/mount.ceph.c index ab96970c312d3..5ead9313b7d4c 100644 --- a/src/mount/mount.ceph.c +++ b/src/mount/mount.ceph.c @@ -171,6 +171,7 @@ static char *parse_options(const char *data, int *filesys_flags) } else if (strncmp(data, "secret", 6) == 0) { if (!value || !*value) { printf("mount option secret requires a value.\n"); + free(saw_name); return NULL; } -- 2.39.5