Blame SOURCES/autofs-5.1.0-fix-memory-leak-in-get_defaults_entry.patch
|
|
6bbd11 |
autofs-5.1.0 - fix memory leak in get_defaults_entry()
|
|
|
6bbd11 |
|
|
|
6bbd11 |
From: Ian Kent <ikent@redhat.com>
|
|
|
6bbd11 |
|
|
|
6bbd11 |
In get_defaults_entry(), if parsing of the expanded defaults string fails
|
|
|
6bbd11 |
the expanded string used for the parse is not freed.
|
|
|
6bbd11 |
---
|
|
|
6bbd11 |
CHANGELOG | 1 +
|
|
|
6bbd11 |
modules/parse_amd.c | 4 +++-
|
|
|
6bbd11 |
2 files changed, 4 insertions(+), 1 deletion(-)
|
|
|
6bbd11 |
|
|
|
6bbd11 |
--- autofs-5.0.7.orig/CHANGELOG
|
|
|
6bbd11 |
+++ autofs-5.0.7/CHANGELOG
|
|
|
6bbd11 |
@@ -150,6 +150,7 @@
|
|
|
6bbd11 |
- fix hosts map options check in lookup_amd_instance().
|
|
|
6bbd11 |
- fix memory leak in create_client().
|
|
|
6bbd11 |
- fix memory leak in get_exports().
|
|
|
6bbd11 |
+- fix memory leak in get_defaults_entry().
|
|
|
6bbd11 |
|
|
|
6bbd11 |
25/07/2012 autofs-5.0.7
|
|
|
6bbd11 |
=======================
|
|
|
6bbd11 |
--- autofs-5.0.7.orig/modules/parse_amd.c
|
|
|
6bbd11 |
+++ autofs-5.0.7/modules/parse_amd.c
|
|
|
6bbd11 |
@@ -1797,8 +1797,10 @@ static struct amd_entry *get_defaults_en
|
|
|
6bbd11 |
char *expand;
|
|
|
6bbd11 |
if (!expand_selectors(ap, defaults, &expand, sv))
|
|
|
6bbd11 |
goto out;
|
|
|
6bbd11 |
- if (amd_parse_list(ap, expand, &dflts, &sv))
|
|
|
6bbd11 |
+ if (amd_parse_list(ap, expand, &dflts, &sv)) {
|
|
|
6bbd11 |
+ free(expand);
|
|
|
6bbd11 |
goto out;
|
|
|
6bbd11 |
+ }
|
|
|
6bbd11 |
entry = select_default_entry(ap, &dflts, sv);
|
|
|
6bbd11 |
if (!entry->map_type) {
|
|
|
6bbd11 |
/*
|