diff options
author | Skylar Chang <chiaweic@codeaurora.org> | 2017-09-13 18:06:29 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-10-01 11:08:38 -0700 |
commit | 64d3618d1e3e5f677684daf1b9a81bef88bd3ac4 (patch) | |
tree | e3a5c460dcfd18b57e880eb49a161a2bcdaefa4a /ipacm | |
parent | 2e9ab884ba63b576f94eddeba572217975f61f03 (diff) | |
download | ipacfg-mgr-64d3618d1e3e5f677684daf1b9a81bef88bd3ac4.tar.gz |
IPACM: fix the fd leaking issue
Fix the fd leaking issue on "resetTetherStats"
and "getStats" APIs.
Change-Id: I131c6ebe1ea1e14194fe4fe019eb21364032e154
Diffstat (limited to 'ipacm')
-rw-r--r-- | ipacm/src/IPACM_OffloadManager.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ipacm/src/IPACM_OffloadManager.cpp b/ipacm/src/IPACM_OffloadManager.cpp index cf32ff9..c923e2d 100644 --- a/ipacm/src/IPACM_OffloadManager.cpp +++ b/ipacm/src/IPACM_OffloadManager.cpp @@ -548,6 +548,7 @@ RET IPACM_OffloadManager::getStats(const char * upstream_name /* upstream */, offload_stats.rx = stats.rx_bytes; IPACMDBG_H("send getStats tx:%lld rx:%lld \n", offload_stats.tx, offload_stats.rx); + close(fd); return SUCCESS; } @@ -648,6 +649,7 @@ int IPACM_OffloadManager::resetTetherStats(const char * upstream_name /* upstrea return FAIL_HARDWARE; } IPACMDBG_H("Reset Interface %s stats\n", upstream_name); + close(fd); return IPACM_SUCCESS; } |