Check if string is not NULL, not *string, before setting *string.

This commit is contained in:
Brian Feldman 2002-02-27 22:00:44 +00:00
parent 7f524f1fe9
commit 92369d84a9

View File

@ -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);