mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
Use g_memory_output_stream_steal_data here
... instead of one extra g_memdup(). Bug #627181.
This commit is contained in:
@@ -2268,8 +2268,11 @@ g_dbus_message_to_blob (GDBusMessage *message,
|
||||
|
||||
g_data_output_stream_put_uint32 (dos, body_size, NULL, NULL);
|
||||
|
||||
if (!g_output_stream_close (G_OUTPUT_STREAM (dos), NULL, error))
|
||||
goto out;
|
||||
|
||||
*out_size = size;
|
||||
ret = g_memdup (g_memory_output_stream_get_data (mos), size);
|
||||
ret = g_memory_output_stream_steal_data (mos);
|
||||
|
||||
out:
|
||||
g_object_unref (dos);
|
||||
|
Reference in New Issue
Block a user