summaryrefslogtreecommitdiffstats
path: root/lib/libc/posix1e/extattr.c
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2002-02-27 22:00:44 +0000
committergreen <green@FreeBSD.org>2002-02-27 22:00:44 +0000
commit669b90746eb55de82fe2cf218bff5dc6cb136240 (patch)
tree870f28180f0b1f308700ab9c1caf36ab52dc015d /lib/libc/posix1e/extattr.c
parentfafeecdcea9f90f37e62e8e7dc1ba72f5602db8a (diff)
downloadFreeBSD-src-669b90746eb55de82fe2cf218bff5dc6cb136240.zip
FreeBSD-src-669b90746eb55de82fe2cf218bff5dc6cb136240.tar.gz
Check if string is not NULL, not *string, before setting *string.
Diffstat (limited to 'lib/libc/posix1e/extattr.c')
-rw-r--r--lib/libc/posix1e/extattr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/posix1e/extattr.c b/lib/libc/posix1e/extattr.c
index eb27bb7..df147e0 100644
--- a/lib/libc/posix1e/extattr.c
+++ b/lib/libc/posix1e/extattr.c
@@ -43,12 +43,12 @@ extattr_namespace_to_string(int attrnamespace, char **string)
switch(attrnamespace) {
case EXTATTR_NAMESPACE_USER:
- if (*string != NULL)
+ if (string != NULL)
*string = strdup(EXTATTR_NAMESPACE_USER_STRING);
return (0);
case EXTATTR_NAMESPACE_SYSTEM:
- if (*string != NULL)
+ if (string != NULL)
*string = strdup(EXTATTR_NAMESPACE_SYSTEM_STRING);
return (0);
OpenPOWER on IntegriCloud