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>
master
Jouni Malinen 8 years ago committed by Jouni Malinen
parent 1f1e599b3b
commit 99a17351c7

@ -185,6 +185,7 @@ struct rfkill_data * rfkill_init(struct rfkill_config *cfg)
if (!found)
goto fail2;
free(phy);
eloop_register_read_sock(rfkill->fd, rfkill_receive, rfkill, NULL);
return rfkill;

Loading…
Cancel
Save