Skip to content

Commit

Permalink
mount.ceph.c: fix resource leak
Browse files Browse the repository at this point in the history
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 <danny.al-gaaf@bisect.de>
  • Loading branch information
dalgaaf authored and tchaikov committed Apr 10, 2017
1 parent 5202b9f commit bbceab5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/mount/mount.ceph.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit bbceab5

Please sign in to comment.