You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

43 lines
1.1 KiB

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