Ian Kent 80cd8f
autofs-5.0.5 - fix strdup() return value check
Ian Kent 80cd8f
Ian Kent 80cd8f
From: Ian Kent <raven@themaw.net>
Ian Kent 80cd8f
Ian Kent 80cd8f
Patch posted by Leonardo Chiquitto.
Ian Kent 80cd8f
Ian Kent 80cd8f
Fix copy and paste error when checking strdup() return value, originally
Ian Kent 80cd8f
reported by David Binderman in:
Ian Kent 80cd8f
Ian Kent 80cd8f
http://bugzilla.novell.com/show_bug.cgi?id=523348
Ian Kent 80cd8f
---
Ian Kent 80cd8f
Ian Kent 80cd8f
 CHANGELOG      |    1 +
Ian Kent 80cd8f
 lib/defaults.c |    2 +-
Ian Kent 80cd8f
 2 files changed, 2 insertions(+), 1 deletion(-)
Ian Kent 80cd8f
Ian Kent 80cd8f
Ian Kent 80cd8f
--- autofs-5.0.5.orig/CHANGELOG
Ian Kent 80cd8f
+++ autofs-5.0.5/CHANGELOG
Ian Kent 80cd8f
@@ -20,6 +20,7 @@
Ian Kent 80cd8f
 - dont connect at ldap lookup module init.
Ian Kent 80cd8f
 - fix random selection option.
Ian Kent 80cd8f
 - fix disable timeout.
Ian Kent 80cd8f
+- fix strdup() return value check (Leonardo Chiquitto).
Ian Kent 80cd8f
 
Ian Kent 80cd8f
 03/09/2009 autofs-5.0.5
Ian Kent 80cd8f
 -----------------------
Ian Kent 80cd8f
--- autofs-5.0.5.orig/lib/defaults.c
Ian Kent 80cd8f
+++ autofs-5.0.5/lib/defaults.c
Ian Kent 80cd8f
@@ -65,7 +65,7 @@ static char *get_env_string(const char *
Ian Kent 80cd8f
 		return NULL;
Ian Kent 80cd8f
 
Ian Kent 80cd8f
 	res = strdup(val);
Ian Kent 80cd8f
-	if (!val)
Ian Kent 80cd8f
+	if (!res)
Ian Kent 80cd8f
 		return NULL;
Ian Kent 80cd8f
 
Ian Kent 80cd8f
 	return res;