Memory leak: p Memory leak: tmp Signed-off-by: Steve Dickson <steved@xxxxxxxxxx> --- src/getnetconfig.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/getnetconfig.c b/src/getnetconfig.c index 92e7c43..d67d97d 100644 --- a/src/getnetconfig.c +++ b/src/getnetconfig.c @@ -709,6 +709,8 @@ struct netconfig *ncp; p->nc_lookups = (char **)malloc((size_t)(p->nc_nlookups+1) * sizeof(char *)); if (p->nc_lookups == NULL) { free(p->nc_netid); + free(p); + free(tmp); return(NULL); } for (i=0; i < p->nc_nlookups; i++) { -- 2.17.1