pacsort: ensure list is freed if size is 0
Found using: `valgrind ./src/util/.libs/lt-pacsort /dev/null` Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
e9b8a7693d
commit
ffdfc82523
1 changed files with 1 additions and 1 deletions
|
@ -383,9 +383,9 @@ int main(int argc, char *argv[])
|
||||||
for(i = 0; i < list->count; i++) {
|
for(i = 0; i < list->count; i++) {
|
||||||
printf("%s%c", list->list[i], linedelim);
|
printf("%s%c", list->list[i], linedelim);
|
||||||
}
|
}
|
||||||
list_free(list);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
list_free(list);
|
||||||
buffer_free(buffer);
|
buffer_free(buffer);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue