Blame SOURCES/autofs-5.1.1-fix-memory-leak-in-nisplus-lookup_reinit.patch
|
|
019928 |
autofs-5.1.1 - fix memory leak in nisplus lookup_reinit()
|
|
|
019928 |
|
|
|
019928 |
From: Ian Kent <raven@themaw.net>
|
|
|
019928 |
|
|
|
019928 |
Don't forget to free context on reinit error.
|
|
|
019928 |
|
|
|
019928 |
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
|
019928 |
---
|
|
|
019928 |
CHANGELOG | 1 +
|
|
|
019928 |
modules/lookup_nisplus.c | 4 +++-
|
|
|
019928 |
2 files changed, 4 insertions(+), 1 deletion(-)
|
|
|
019928 |
|
|
|
019928 |
--- autofs-5.0.7.orig/CHANGELOG
|
|
|
019928 |
+++ autofs-5.0.7/CHANGELOG
|
|
|
019928 |
@@ -198,6 +198,7 @@
|
|
|
019928 |
- change lookup to use reinit instead of reopen.
|
|
|
019928 |
- fix unbind sasl external mech.
|
|
|
019928 |
- fix sasl connection concurrancy problem.
|
|
|
019928 |
+- fix memory leak in nisplus lookup_reinit().
|
|
|
019928 |
|
|
|
019928 |
25/07/2012 autofs-5.0.7
|
|
|
019928 |
=======================
|
|
|
019928 |
--- autofs-5.0.7.orig/modules/lookup_nisplus.c
|
|
|
019928 |
+++ autofs-5.0.7/modules/lookup_nisplus.c
|
|
|
019928 |
@@ -116,8 +116,10 @@ int lookup_reinit(const char *mapfmt,
|
|
|
019928 |
|
|
|
019928 |
new->parse = ctxt->parse;
|
|
|
019928 |
ret = do_init(mapfmt, argc, argv, new, 1);
|
|
|
019928 |
- if (ret)
|
|
|
019928 |
+ if (ret) {
|
|
|
019928 |
+ free(new);
|
|
|
019928 |
return 1;
|
|
|
019928 |
+ }
|
|
|
019928 |
|
|
|
019928 |
*context = new;
|
|
|
019928 |
|