Commit a9aef9b3 authored by Simon McVittie's avatar Simon McVittie

dbus-nonce: Don't crash on encountering OOM

Signed-off-by: Simon McVittie's avatarSimon McVittie <>
Reviewed-by: Philip Withnall's avatarPhilip Withnall <>
parent 9ded6907
......@@ -301,6 +301,11 @@ do_noncefile_create (DBusNonceFile **noncefile_out,
_dbus_assert (*noncefile_out == NULL);
noncefile = dbus_new0 (DBusNonceFile, 1);
if (noncefile == NULL)
dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);
return FALSE;
/* Make it valid to "free" these even if _dbus_string_init() runs
* out of memory: see comment in do_check_nonce() */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment