Signed-off-by: Sami Kerola <kerolasa@xxxxxx> --- text-utils/column.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/text-utils/column.c b/text-utils/column.c index 9605afb..99053fd 100644 --- a/text-utils/column.c +++ b/text-utils/column.c @@ -190,6 +190,11 @@ int main(int argc, char **argv) c_columnate(); else r_columnate(); + + for (int i = 0; i < entries; i++) + free(list[i]); + free(list); + if (ferror(stdout) || fclose(stdout)) eval = EXIT_FAILURE; exit(eval); @@ -317,6 +322,14 @@ static void maketbl() putwchar('\n'); } } + + for (cnt = 0; cnt < entries; ++cnt) { + free((tbl+cnt)->list); + free((tbl+cnt)->len); + } + free(cols); + free(lens); + free(tbl); } static void input(FILE *fp) -- 1.7.5 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html