From: Taesoo Jun Date: Tue, 10 Apr 2018 02:49:57 +0000 (+0900) Subject: Fix memory leak in __netconfig_request_netlink_scan() X-Git-Tag: accepted/tizen/unified/20180413.073636~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=ffbaceecfd6024ca9feaee47750ad661ad470bc5;p=platform%2Fcore%2Fconnectivity%2Fnet-config.git Fix memory leak in __netconfig_request_netlink_scan() Change-Id: I175131016b300e3ad9ffd9fce67c98b1c63d0ae3 --- diff --git a/src/wifi-netlink-scan.c b/src/wifi-netlink-scan.c index e008fd2..3ad72c5 100755 --- a/src/wifi-netlink-scan.c +++ b/src/wifi-netlink-scan.c @@ -693,7 +693,7 @@ static int __netconfig_request_netlink_scan(struct nl_sock *socket, if (results.aborted) { DBG("scan aborted"); - return 1; + goto out; } out: @@ -703,7 +703,7 @@ out: nl_cb_put(cb); nl_socket_drop_membership(socket, mcid); - if (ret < 0) + if (ret < 0 || ret == 1) return ret; DBG("Scan done");