From: Garrett Wollman Date: Wed, 25 Jul 2012 04:49:25 +0000 (-0400) Subject: rxgen: avoid an unimportant memory leak in docppline() X-Git-Tag: upstream/1.8.0_pre1^2~2156 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=a573697da3fed9509f98e087b65b1fb7a60bc9a0;p=packages%2Fo%2Fopenafs.git rxgen: avoid an unimportant memory leak in docppline() If cpp emitted # 1234 "" docppline() would leak a small buffer. Just free it. The static analyzer will thank you. Change-Id: I34ae6e228469a900139375f2a4758855922cf0ef Reviewed-on: http://gerrit.openafs.org/7871 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear --- diff --git a/src/rxgen/rpc_scan.c b/src/rxgen/rpc_scan.c index c406be574..dc3abc051 100644 --- a/src/rxgen/rpc_scan.c +++ b/src/rxgen/rpc_scan.c @@ -517,6 +517,7 @@ docppline(char *line, int *lineno, char **fname) *p = 0; if (*file == 0) { *fname = NULL; + free(file); } else { *fname = file; }