From cb7205dc3b7daee801e355d3a44a8d2b9adc54a0 Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin Date: Fri, 1 Sep 2023 20:06:01 +0200 Subject: [PATCH] pppd/options.c: fix memory leak on error path (#441) 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 --- pppd/options.c | 1 + 1 file changed, 1 insertion(+) diff --git a/pppd/options.c b/pppd/options.c index 227e615c9..0e17820f9 100644 --- a/pppd/options.c +++ b/pppd/options.c @@ -1802,6 +1802,7 @@ loadplugin(char **argv) (*init)(); if (path != arg) free(path); + dlclose(handle); return 1; errclose: