Message ID | 20180907180151.178872-6-steved@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | libtirpc: Closed a number of memory leaks | expand |
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++) {
Memory leak: p Memory leak: tmp Signed-off-by: Steve Dickson <steved@redhat.com> --- src/getnetconfig.c | 2 ++ 1 file changed, 2 insertions(+)