diff options
-rw-r--r-- | mount.cifs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mount.cifs.c b/mount.cifs.c index 2116fc8..6935fe1 100644 --- a/mount.cifs.c +++ b/mount.cifs.c @@ -1895,7 +1895,7 @@ acquire_mountpoint(char **mountpointp) int rc, dacrc; uid_t realuid, oldfsuid; gid_t oldfsgid; - char *mountpoint; + char *mountpoint = NULL; /* * Acquire the necessary privileges to chdir to the mountpoint. If @@ -1944,9 +1944,9 @@ restore_privs: gid_t __attribute__((unused)) gignore = setfsgid(oldfsgid); } - if (rc) { - free(*mountpointp); - } + if (rc) + free(mountpoint); + return rc; } |