summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinit Deshpande <vinitd@google.com>2015-12-09 16:40:37 -0800
committerVinit Deshpande <vinitd@google.com>2015-12-10 13:18:28 -0800
commitf0c9628714bda31e58149bdc1d229a55df063121 (patch)
tree68558b5ffd80091346937d8af6f03c64ec1a5a26
parent3a6288afe9317768eef26f1e69e5fdbd97cd396e (diff)
downloadplatform_hardware_qcom_wlan-marshmallow-dr1.6-release.tar.gz
platform_hardware_qcom_wlan-marshmallow-dr1.6-release.tar.bz2
platform_hardware_qcom_wlan-marshmallow-dr1.6-release.zip
Colin (ccross@google.com) found out that create() gets called on same object multiple times; without a call to destroy() in between; this causes leaks. This change will destroy the request object, before allowing create to proceed. BUG: 25392275 Change-Id: Id2199346020dd69f735f50fe3b2f11bfe251cad0
-rw-r--r--qcwcn/wifi_hal/cpp_bindings.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/qcwcn/wifi_hal/cpp_bindings.cpp b/qcwcn/wifi_hal/cpp_bindings.cpp
index 381d8c8..99fb26b 100644
--- a/qcwcn/wifi_hal/cpp_bindings.cpp
+++ b/qcwcn/wifi_hal/cpp_bindings.cpp
@@ -556,6 +556,9 @@ int WifiEvent::parse() {
}
int WifiRequest::create(int family, uint8_t cmd, int flags, int hdrlen) {
+
+ destroy();
+
mMsg = nlmsg_alloc();
if (mMsg != NULL) {
genlmsg_put(mMsg, /* pid = */ 0, /* seq = */ 0, family,