summaryrefslogtreecommitdiffstats
path: root/service/jni
diff options
context:
space:
mode:
Diffstat (limited to 'service/jni')
-rw-r--r--service/jni/com_android_server_wifi_WifiNative.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/service/jni/com_android_server_wifi_WifiNative.cpp b/service/jni/com_android_server_wifi_WifiNative.cpp
index a6d4f4ee9..2f6c363cc 100644
--- a/service/jni/com_android_server_wifi_WifiNative.cpp
+++ b/service/jni/com_android_server_wifi_WifiNative.cpp
@@ -1586,6 +1586,7 @@ static jobject android_net_wifi_get_driver_version(JNIEnv *env, jclass cls, jint
ALOGD("android_net_wifi_get_driver_version = %p", handle);
if (handle == 0) {
+ free(buffer);
return NULL;
}
@@ -1616,6 +1617,7 @@ static jobject android_net_wifi_get_firmware_version(JNIEnv *env, jclass cls, ji
ALOGD("android_net_wifi_get_firmware_version = %p", handle);
if (handle == 0) {
+ free(buffer);
return NULL;
}