dbus: fix memory leak issue 13/70613/1 accepted/tizen/common/20160520.171320 accepted/tizen/ivi/20160520.081651 accepted/tizen/mobile/20160520.081712 accepted/tizen/tv/20160520.081646 accepted/tizen/wearable/20160520.081638 submit/tizen/20160520.041904
authorTaeyoung Kim <ty317.kim@samsung.com>
Fri, 20 May 2016 01:04:04 +0000 (10:04 +0900)
committerTaeyoung Kim <ty317.kim@samsung.com>
Fri, 20 May 2016 01:04:04 +0000 (10:04 +0900)
==858== 8 bytes in 1 blocks are definitely lost in loss record 946 of 5,161
==858==    at 0x4845750: malloc (vg_replace_malloc.c:296)
==858==    by 0x5A22DF3: dbus_method_async_with_reply (dbus.c:237)
==858==    by 0x5A21FE5: unlock_state (power.c:168)
==858==    by 0x5A2239F: device_power_release_lock (power.c:197)

Change-Id: Ifbcf5c3c70b487c8cb6a98775fd62243febb9cc0
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
src/dbus.c

index 41faabd..08d5a98 100644 (file)
@@ -186,6 +186,7 @@ static void cb_pending(GDBusProxy *proxy,
 
        if (data && data->func)
                data->func(data->data, output, err);
+       free(data);
 
        if (err)
                g_clear_error(&err);