From 93aa733909e72da4a67ef8422070f417cd12b1d8 Mon Sep 17 00:00:00 2001 From: Garrett Wollman Date: Wed, 25 Jul 2012 00:41:05 -0400 Subject: [PATCH] tabular_output: don't leak table struct on error exit The caller is almost certainly going to exit when we return, but all the same, don't leak the table description structure in the error exit. Makes the static analyzer happier. Change-Id: I55e986a3601968751921ee38badf5bb86cd3174f Reviewed-on: http://gerrit.openafs.org/7870 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear --- src/util/tabular_output.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/tabular_output.c b/src/util/tabular_output.c index cfd43b26ed..7f8eb291ab 100644 --- a/src/util/tabular_output.c +++ b/src/util/tabular_output.c @@ -399,6 +399,7 @@ util_newTable(int Type, int numColumns, char **ColumnHeaders, int *ColumnContent break; default : fprintf(stderr,"Error. Invalid TableType: %d.\n", Table->Type); + free(Table); errno=EINVAL; return NULL; }