]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
su: use xstrdup()
authorKarel Zak <kzak@redhat.com>
Thu, 26 Jul 2012 19:48:50 +0000 (21:48 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 26 Jul 2012 19:48:50 +0000 (21:48 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
login-utils/su.c

index f1f5fdfa6573bb9851802e3a122699a33ad8ae8f..35a4277438aad7b454db1896215c09d872a616ab 100644 (file)
@@ -449,9 +449,7 @@ clearsbin (const char *const path)
   if (!path || *path == 0)
     return NULL;
 
-  tmp = strdup (path);
-  if (!tmp)
-    return NULL;
+  tmp = xstrdup (path);
 
   ret = xmalloc (strlen (path) + 1);
   *ret = 0;