mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-02 13:53:06 +02:00
Use g_memory_output_stream_steal_data here
... instead of one extra g_memdup(). Bug #627181.
This commit is contained in:
parent
71e73ffdfb
commit
7191fc3f17
@ -2268,8 +2268,11 @@ g_dbus_message_to_blob (GDBusMessage *message,
|
|||||||
|
|
||||||
g_data_output_stream_put_uint32 (dos, body_size, NULL, NULL);
|
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;
|
*out_size = size;
|
||||||
ret = g_memdup (g_memory_output_stream_get_data (mos), size);
|
ret = g_memory_output_stream_steal_data (mos);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
g_object_unref (dos);
|
g_object_unref (dos);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user