From 6166259f74855fe9e6976175eeb7b16912bc477a Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Tue, 27 Dec 2016 23:30:06 +0100 Subject: lib: Fix memleak in irm.c --- src/lib/irm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/lib/irm.c b/src/lib/irm.c index 4b9a6285..0d9d0f86 100644 --- a/src/lib/irm.c +++ b/src/lib/irm.c @@ -358,6 +358,9 @@ int irm_bind_ap(char * ap, msg.opts = opts; recv_msg = send_recv_irm_msg(&msg); + + free(full_ap_name); + if (recv_msg == NULL) return -1; @@ -369,7 +372,6 @@ int irm_bind_ap(char * ap, ret = recv_msg->result; irm_msg__free_unpacked(recv_msg, NULL); - free(full_ap_name); return ret; } -- cgit v1.2.3