diff options
author | sanghyeok.oh <sanghyeok.oh@samsung.com> | 2019-01-03 21:31:45 +0900 |
---|---|---|
committer | sanghyeok.oh <sanghyeok.oh@samsung.com> | 2019-01-03 21:32:11 +0900 |
commit | ba690e0fa1b7f8ee61d6bcfa5ec5a71357d40ba0 (patch) | |
tree | 386a97dda3875aae7b664101db65c6e2564e849d | |
parent | ded2f2643812cac2181f84150655814c8f95a7d4 (diff) | |
download | dbus-ba690e0fa1b7f8ee61d6bcfa5ec5a71357d40ba0.tar.gz dbus-ba690e0fa1b7f8ee61d6bcfa5ec5a71357d40ba0.tar.bz2 dbus-ba690e0fa1b7f8ee61d6bcfa5ec5a71357d40ba0.zip |
kdbus: fixed memory leak in process_connection_info_cmd()submit/tizen/20190104.021452accepted/tizen/unified/20190105.054101
Change-Id: I67e577761e7596eac400bc8c35386f4c0cbf840a
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
-rwxr-xr-x | dbus/kdbus-common.c | 5 |
1 files changed, 4 insertions, 1 deletions
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) |