From: Garrett Wollman Date: Wed, 25 Jul 2012 04:41:05 +0000 (-0400) Subject: tabular_output: don't leak table struct on error exit X-Git-Tag: upstream/1.8.0_pre1^2~2145 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=93aa733909e72da4a67ef8422070f417cd12b1d8;p=packages%2Fo%2Fopenafs.git 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 --- diff --git a/src/util/tabular_output.c b/src/util/tabular_output.c index cfd43b26e..7f8eb291a 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; }