From: sanghyeok.oh Date: Thu, 3 Jan 2019 12:31:45 +0000 (+0900) Subject: kdbus: fixed memory leak in process_connection_info_cmd() X-Git-Tag: submit/tizen/20190104.021452^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ba690e0fa1b7f8ee61d6bcfa5ec5a71357d40ba0;p=platform%2Fupstream%2Fdbus.git kdbus: fixed memory leak in process_connection_info_cmd() Change-Id: I67e577761e7596eac400bc8c35386f4c0cbf840a Signed-off-by: sanghyeok.oh --- diff --git a/dbus/kdbus-common.c b/dbus/kdbus-common.c index e1550377..008f7019 100755 --- a/dbus/kdbus-common.c +++ b/dbus/kdbus-common.c @@ -1022,6 +1022,7 @@ process_connection_info_cmd (kdbus_t *kdbus, if (ret < 0) { pInfo->uniqueId = 0; + dbus_free(cmd); return errno; } @@ -1029,8 +1030,10 @@ process_connection_info_cmd (kdbus_t *kdbus, ret = decode_connection_info (kdbus_info, pInfo, get_sec_label); - if (ret != 0) + if (ret != 0) { + dbus_free(cmd); return ret; + } ret = free_by_offset (kdbus, cmd->offset); if (ret != 0)