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

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