getnetconfig.c: free linep to avoid memory leakage
Subsystems (2)
PATCH 1/1 getnetconfig.c: free linep to avoid memory leakage
Signed-off-by Zhi Li <[email protected]>
--- src/getnetconfig.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
src/getnetconfig.c +1 -3
@@ -507,9 +507,7 @@ getnetconfigent(netid)break ; } }while (stringp !=NULL ); -if (ncp ==NULL ) { -free (linep); - } +free (linep);fclose (file);return (ncp); }
Signature · 1 line
2.39.0
Quoted 1 line · Zhi Li
Signed-off-by Zhi Li<[email protected]>
Committed... (tag: libtirpc-1-3-7-rc1)
steved.
Quoted 21 lines
--- src/getnetconfig.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)src/getnetconfig.c +1
-4@@ -507,9 +507,7 @@ getnetconfigent(netid)break ; } }while (stringp !=NULL ); -if (ncp ==NULL ) { -free (linep); - } +free (linep);fclose (file);return (ncp); } -- 2.39.0