summaryrefslogtreecommitdiffstats
path: root/login-utils/su.c
diff options
context:
space:
mode:
authorKarel Zak2012-07-26 21:48:50 +0200
committerKarel Zak2012-07-26 21:48:50 +0200
commit99b765f0c48e414dcc6f2921e53af7253637f758 (patch)
treeef66112d0f3a572f8c0bebda4d8e9060c2e830f8 /login-utils/su.c
parenttests: update build-sys tests (diff)
downloadkernel-qcow2-util-linux-99b765f0c48e414dcc6f2921e53af7253637f758.tar.gz
kernel-qcow2-util-linux-99b765f0c48e414dcc6f2921e53af7253637f758.tar.xz
kernel-qcow2-util-linux-99b765f0c48e414dcc6f2921e53af7253637f758.zip
su: use xstrdup()
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'login-utils/su.c')
-rw-r--r--login-utils/su.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/login-utils/su.c b/login-utils/su.c
index f1f5fdfa6..35a427743 100644
--- a/login-utils/su.c
+++ b/login-utils/su.c
@@ -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;