tc_exec: Fix descriptor leak in get_exec_kind()
Subsystems (2)
PATCH 1/1 tc_exec: Fix descriptor leak in get_exec_kind()
Found by RASU JSC
Signed-off-by Maks Mishin <[email protected]>
--- tc/tc_exec.c | 3 +++ 1 file changed, 3 insertions(+)
tc/tc_exec.c +3 -0
@@ -60,6 +60,9 @@ static struct exec_util *get_exec_kind(const char *name)snprintf (buf,sizeof (buf),"%s_exec_util" , name); eu =dlsym (dlh, buf); +if (dlh !=NULL ) +dlclose (dlh); +if (eu ==NULL ) goto noexist; reg:
Signature · 1 line
2.30.2