Closed a memory leak during retrieval of xattr.
This commit is contained in:
parent
da8ad0d2aa
commit
02a972a2d7
@ -1609,8 +1609,14 @@ int attrs_cleanout_name(char *del_name, size_t *num_attrs, char **names,
|
||||
size_t i, w;
|
||||
|
||||
for (w = i = 0; i < *num_attrs; i++) {
|
||||
if ((strcmp(names[i], del_name) == 0) ^ (flag & 1))
|
||||
if ((strcmp(names[i], del_name) == 0) ^ (flag & 1)) {
|
||||
if (names[i] != NULL)
|
||||
free(names[i]);
|
||||
if (values[i] != NULL)
|
||||
free(values[i]);
|
||||
names[i] = values[i] = NULL;
|
||||
continue;
|
||||
}
|
||||
if (w == i) {
|
||||
w++;
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user