mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2025-12-25 22:10:08 +01:00
dbus_message_demarshal: Set error if we can't allocate the loader
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=100317 Reviewed-by: Philip Withnall <withnall@endlessm.com> Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
7fe435b5c2
commit
ecbcffae19
1 changed files with 6 additions and 3 deletions
|
|
@ -5086,7 +5086,7 @@ dbus_message_demarshal (const char *str,
|
|||
int len,
|
||||
DBusError *error)
|
||||
{
|
||||
DBusMessageLoader *loader;
|
||||
DBusMessageLoader *loader = NULL;
|
||||
DBusString *buffer;
|
||||
DBusMessage *msg;
|
||||
|
||||
|
|
@ -5095,7 +5095,7 @@ dbus_message_demarshal (const char *str,
|
|||
loader = _dbus_message_loader_new ();
|
||||
|
||||
if (loader == NULL)
|
||||
return NULL;
|
||||
goto fail_oom;
|
||||
|
||||
_dbus_message_loader_get_buffer (loader, &buffer, NULL, NULL);
|
||||
|
||||
|
|
@ -5126,7 +5126,10 @@ dbus_message_demarshal (const char *str,
|
|||
|
||||
fail_oom:
|
||||
_DBUS_SET_OOM (error);
|
||||
_dbus_message_loader_unref (loader);
|
||||
|
||||
if (loader != NULL)
|
||||
_dbus_message_loader_unref (loader);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue