diff options
author | Andrew Gregory <andrew.gregory.8@gmail.com> | 2012-11-24 19:15:04 +0100 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2012-12-14 03:35:34 +0100 |
commit | 964640fbfcde48b7937a6c18964c78a3b11db3de (patch) | |
tree | 45673e7952283f229afda38c3f753b1052a4082e /src/pacman/util.c | |
parent | c8417f3386155028015f7f9fc43f4c64a60acf4c (diff) | |
download | pacman-964640fbfcde48b7937a6c18964c78a3b11db3de.tar.gz pacman-964640fbfcde48b7937a6c18964c78a3b11db3de.tar.xz |
Plug various minor memory leaks
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src/pacman/util.c')
-rw-r--r-- | src/pacman/util.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pacman/util.c b/src/pacman/util.c index 78cdf264..4c471dd6 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -560,6 +560,8 @@ static size_t table_calc_widths(const alpm_list_t *header, colwidths = malloc(totalcols * sizeof(size_t)); coldata = calloc(totalcols, sizeof(int)); if(!colwidths || !coldata) { + free(colwidths); + free(coldata); return 0; } /* header determines column count and initial values of longest_strs */ |