diff options
author | Dan McGee <dan@archlinux.org> | 2011-08-22 08:50:43 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-08-22 08:53:01 -0500 |
commit | ffdfc825234987b9f974d7a8a152babb10cb8663 (patch) | |
tree | 6a38cb109aa440bb4b993eb1ce6c334e7d6c6598 /src/util/pacsort.c | |
parent | e9b8a7693dce4d7be959c6a9f4112014884e647c (diff) | |
download | pacman-ffdfc825234987b9f974d7a8a152babb10cb8663.tar.xz |
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>
Diffstat (limited to 'src/util/pacsort.c')
-rw-r--r-- | src/util/pacsort.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/pacsort.c b/src/util/pacsort.c index 082ba728..8236c959 100644 --- a/src/util/pacsort.c +++ b/src/util/pacsort.c @@ -383,9 +383,9 @@ int main(int argc, char *argv[]) for(i = 0; i < list->count; i++) { printf("%s%c", list->list[i], linedelim); } - list_free(list); } + list_free(list); buffer_free(buffer); return 0; |