diff options
author | sanghyeok.oh <sanghyeok.oh@samsung.com> | 2017-04-12 20:24:27 +0900 |
---|---|---|
committer | sanghyeok oh <sanghyeok.oh@samsung.com> | 2017-04-12 21:27:52 -0700 |
commit | c90bc4f4a2d9bde65f1c8c4ecb0d4dc96a7698d5 (patch) | |
tree | b2ad394aa0b52ef07483874098e685f4447b8371 | |
parent | 0775b0525920e5989feb4fb2841737f37516a7f6 (diff) | |
download | dbus-accepted/tizen/3.0/tv/20170414.103714.tar.gz dbus-accepted/tizen/3.0/tv/20170414.103714.tar.bz2 dbus-accepted/tizen/3.0/tv/20170414.103714.zip |
svace:fix leaksubmit/tizen_3.0/20170413.043021accepted/tizen/3.0/wearable/20170414.103734accepted/tizen/3.0/tv/20170414.103714accepted/tizen/3.0/mobile/20170414.103656accepted/tizen/3.0/ivi/20170414.103758accepted/tizen/3.0/common/20170414.115940
Change-Id: Ifce97dae8b9390d492708bfd7d7467c1af1ed132
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
(cherry picked from commit 73d29ba2d5bdd7d89c414cd967cd510d48c58bfa)
-rw-r--r-- | dbus/dbus-message.c | 2 | ||||
-rwxr-xr-x | dbus/dbus-transport-kdbus.c | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c index 0e3f323b..4a1f7949 100644 --- a/dbus/dbus-message.c +++ b/dbus/dbus-message.c @@ -4340,6 +4340,8 @@ load_message (DBusMessageLoader *loader, { if (_dbus_message_is_gvariant (message)) { + type_str = NULL; + type_pos = 0; validity = _dbus_validate_gvariant_body_with_reason (type_str, type_pos, byte_order, diff --git a/dbus/dbus-transport-kdbus.c b/dbus/dbus-transport-kdbus.c index 893a3eff..099b8b32 100755 --- a/dbus/dbus-transport-kdbus.c +++ b/dbus/dbus-transport-kdbus.c @@ -1034,6 +1034,13 @@ kdbus_write_msg_internal (DBusTransportKdbus *transport, /* alloc palce for fds */ fds = dbus_malloc (sizeof (int) * (n_fds + 1)); + if (fds == NULL) + { + ret_size = -1; + kdbus_close_message (transport, msg_reply); + dbus_free (data); + goto out; + } /* decode dbus message */ ret = kdbus_decode_dbus_message (msg_reply, data, @@ -1042,6 +1049,7 @@ kdbus_write_msg_internal (DBusTransportKdbus *transport, { ret_size = -1; kdbus_close_message (transport, msg_reply); + dbus_free (fds); dbus_free (data); goto out; } @@ -2162,7 +2170,11 @@ reply_listNames (DBusTransportKdbus *transport, if (!dbus_message_iter_append_basic (&array_iter, DBUS_TYPE_STRING, &name_ptr)) - goto oom_iterator; + { + if (flags & KDBUS_LIST_QUEUED) + free (name_ptr); + goto oom_iterator; + } if (flags & KDBUS_LIST_QUEUED) free (name_ptr); |