From cc29721b61005d13830d770f50ea424f496d3f4d Mon Sep 17 00:00:00 2001 From: Seonah Moon Date: Fri, 25 Nov 2016 11:24:38 +0900 Subject: [PATCH] [WGID-155808] Fixed memory leak Change-Id: If9657f59138447d0155a4d1fecbfc39b6750361c Signed-off-by: Seonah Moon --- packaging/mobileap-agent.spec | 2 +- src/mobileap_softap.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packaging/mobileap-agent.spec b/packaging/mobileap-agent.spec index c705b7f..aabe13c 100644 --- a/packaging/mobileap-agent.spec +++ b/packaging/mobileap-agent.spec @@ -1,6 +1,6 @@ Name: mobileap-agent Summary: Mobile AP daemon for setting tethering environments -Version: 1.0.82 +Version: 1.0.83 Release: 1 Group: System/Network License: Apache-2.0 diff --git a/src/mobileap_softap.c b/src/mobileap_softap.c index 04c46ee..d712dd1 100755 --- a/src/mobileap_softap.c +++ b/src/mobileap_softap.c @@ -1612,8 +1612,11 @@ int _mh_core_change_mac(const char *mac) if (ioctl(fd, SIOCSIFHWADDR, &ifr)==-1) { ERR("Failed to change macaddress\n"); + close(fd); return MOBILE_AP_ERROR_INTERNAL; } + + close(fd); #endif return MOBILE_AP_ERROR_NONE; -- 2.7.4