summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-08-22 08:50:43 -0500
committerDan McGee <dan@archlinux.org>2011-08-22 08:53:01 -0500
commitffdfc825234987b9f974d7a8a152babb10cb8663 (patch)
tree6a38cb109aa440bb4b993eb1ce6c334e7d6c6598
parente9b8a7693dce4d7be959c6a9f4112014884e647c (diff)
downloadpacman-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>
-rw-r--r--src/util/pacsort.c2
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;