mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-02-15 04:30:40 +01:00
_dbus_message_iter_open_signature: Clarify why this is not leaky
The same assertion appears closer to the top of the function, and there is no opportunity for it to have become false here. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101568
This commit is contained in:
parent
6b7bdb105b
commit
075aebc8f9
1 changed files with 3 additions and 0 deletions
|
|
@ -2538,6 +2538,9 @@ _dbus_message_iter_open_signature (DBusMessageRealIter *real)
|
|||
|
||||
real->sig_refcount = 1;
|
||||
|
||||
/* If this assertion failed, then str would be neither stored in u.writer
|
||||
* nor freed by this function, resulting in a memory leak. */
|
||||
_dbus_assert (real->u.writer.type_str == NULL);
|
||||
_dbus_type_writer_add_types (&real->u.writer,
|
||||
str, _dbus_string_get_length (str));
|
||||
return TRUE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue