Check if string is not NULL, not *string, before setting *string.
This commit is contained in:
parent
7f524f1fe9
commit
92369d84a9
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user