From: Jouni Malinen Date: Mon, 15 Feb 2016 22:14:47 +0000 (+0200) Subject: rfkill: Fix a memory leak X-Git-Tag: hostap_2_6~914 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99a17351c7c1ab70a4c1ee53a83f56977a3df047;p=thirdparty%2Fhostap.git 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 --- diff --git a/src/drivers/rfkill.c b/src/drivers/rfkill.c index 464cf7834..4d4d1b448 100644 --- a/src/drivers/rfkill.c +++ b/src/drivers/rfkill.c @@ -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;