rfkill: Fix a memory leak
rfkill_init() uses realpath() which allocates memory and that memory was not freed on the success path. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
1f1e599b3b
commit
99a17351c7
1 changed files with 1 additions and 0 deletions
|
@ -185,6 +185,7 @@ struct rfkill_data * rfkill_init(struct rfkill_config *cfg)
|
||||||
if (!found)
|
if (!found)
|
||||||
goto fail2;
|
goto fail2;
|
||||||
|
|
||||||
|
free(phy);
|
||||||
eloop_register_read_sock(rfkill->fd, rfkill_receive, rfkill, NULL);
|
eloop_register_read_sock(rfkill->fd, rfkill_receive, rfkill, NULL);
|
||||||
|
|
||||||
return rfkill;
|
return rfkill;
|
||||||
|
|
Loading…
Reference in a new issue