Blame SOURCES/autofs-5.1.3-fix-memory-leak-in-umount_amd_ext_mount.patch

306fa1
autofs-5.1.3 - fix memory leak in umount_amd_ext_mount()
306fa1
306fa1
From: Ian Kent <raven@themaw.net>
306fa1
306fa1
Free allocated resources before returning success if mount is
306fa1
found to be in use by another user.
306fa1
306fa1
Signed-off-by: Ian Kent <raven@themaw.net>
306fa1
---
306fa1
 CHANGELOG    |    1 +
306fa1
 lib/mounts.c |    4 ++--
306fa1
 2 files changed, 3 insertions(+), 2 deletions(-)
306fa1
306fa1
--- autofs-5.0.7.orig/CHANGELOG
306fa1
+++ autofs-5.0.7/CHANGELOG
306fa1
@@ -282,6 +282,7 @@
306fa1
 - add function ext_mount_inuse().
306fa1
 - add function construct_argv().
306fa1
 - add amd mount type program mount support.
306fa1
+- fix memory leak in umount_amd_ext_mount().
306fa1
 
306fa1
 25/07/2012 autofs-5.0.7
306fa1
 =======================
306fa1
--- autofs-5.0.7.orig/lib/mounts.c
306fa1
+++ autofs-5.0.7/lib/mounts.c
306fa1
@@ -2076,7 +2076,7 @@ int umount_amd_ext_mount(struct autofs_p
306fa1
 
306fa1
 		if (!ext_mount_remove(&entry->ext_mount, entry->fs)) {
306fa1
 			rv =0;
306fa1
-			goto out;
306fa1
+			goto out_free;
306fa1
 		}
306fa1
 
306fa1
 		rv = spawnv(ap->logopt, prog, (const char * const *) argv);
306fa1
@@ -2089,7 +2089,7 @@ int umount_amd_ext_mount(struct autofs_p
306fa1
 			      "umounted program mount at %s", entry->fs);
306fa1
 			rmdir_path(ap, entry->fs, ap->dev);
306fa1
 		}
306fa1
-
306fa1
+out_free:
306fa1
 		free_argv(argc, (const char **) argv);
306fa1
 		free(str);
306fa1