Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > efe7bb1760b93289b44ae0a17c03ac12 > files > 37

autofs-5.0.5-28.fc13.src.rpm

autofs-5.0.5 - fix strdup() return value check

From: Ian Kent <raven@themaw.net>

Patch posted by Leonardo Chiquitto.

Fix copy and paste error when checking strdup() return value, originally
reported by David Binderman in:

http://bugzilla.novell.com/show_bug.cgi?id=523348
---

 CHANGELOG      |    1 +
 lib/defaults.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)


--- autofs-5.0.5.orig/CHANGELOG
+++ autofs-5.0.5/CHANGELOG
@@ -20,6 +20,7 @@
 - dont connect at ldap lookup module init.
 - fix random selection option.
 - fix disable timeout.
+- fix strdup() return value check (Leonardo Chiquitto).
 
 03/09/2009 autofs-5.0.5
 -----------------------
--- autofs-5.0.5.orig/lib/defaults.c
+++ autofs-5.0.5/lib/defaults.c
@@ -65,7 +65,7 @@ static char *get_env_string(const char *
 		return NULL;
 
 	res = strdup(val);
-	if (!val)
+	if (!res)
 		return NULL;
 
 	return res;