diff options
author | green <green@FreeBSD.org> | 2002-02-27 22:00:44 +0000 |
---|---|---|
committer | green <green@FreeBSD.org> | 2002-02-27 22:00:44 +0000 |
commit | 669b90746eb55de82fe2cf218bff5dc6cb136240 (patch) | |
tree | 870f28180f0b1f308700ab9c1caf36ab52dc015d | |
parent | fafeecdcea9f90f37e62e8e7dc1ba72f5602db8a (diff) | |
download | FreeBSD-src-669b90746eb55de82fe2cf218bff5dc6cb136240.zip FreeBSD-src-669b90746eb55de82fe2cf218bff5dc6cb136240.tar.gz |
Check if string is not NULL, not *string, before setting *string.
-rw-r--r-- | lib/libc/posix1e/extattr.c | 4 |
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); |