From: Danny Al-Gaaf Date: Mon, 20 Feb 2017 15:41:49 +0000 (+0100) Subject: mount.ceph.c: fix resource leak X-Git-Tag: v12.0.2~116^2~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bbceab593967f4ef9e572b15d59f8936bd1040b1;p=ceph.git 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 --- diff --git a/src/mount/mount.ceph.c b/src/mount/mount.ceph.c index ab96970c312..5ead9313b7d 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; }