Skip to content

Commit

Permalink
pppd/options.c: fix memory leak on error path (#441)
Browse files Browse the repository at this point in the history
found by Coverity

1803    if (path != arg)
1804        free(path);

    CID 436214 (#1 of 1): Resource leak (RESOURCE_LEAK)
    12. leaked_storage: Variable handle going out of scope leaks the
	storage it points to.
	1805    return 1;

Signed-off-by: Ilya Shipitsin <[email protected]>
  • Loading branch information
chipitsine committed Sep 1, 2023
1 parent f5aa69b commit cb7205d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pppd/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -1802,6 +1802,7 @@ loadplugin(char **argv)
(*init)();
if (path != arg)
free(path);
dlclose(handle);
return 1;

errclose:
Expand Down

0 comments on commit cb7205d

Please sign in to comment.