autofs  

[autofs] [PATCH] fix strdup() return value check

Leonardo Chiquitto
Wed, 23 Dec 2009 12:05:03 -0800

Ian,

  Please consider the following patch.

Thanks,
Leonardo


    autofs-5.0.5 - fix strdup() return value check

    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

Index: autofs/lib/defaults.c
===================================================================
--- autofs.orig/lib/defaults.c
+++ autofs/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;

_______________________________________________
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs
  • [autofs] [PATCH] fix strdup() return value check Leonardo Chiquitto