Commit c1d8b9c8 authored by Philip Withnall's avatar Philip Withnall

gbufferedoutputstream: Fix jump conditional on uninitialised data

The flush data structures were not zero-initialised, which meant the
branch in flush_buffer_thread() was based on an uninitialised condition.
Signed-off-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>
parent cbfa776f
......@@ -699,7 +699,7 @@ g_buffered_output_stream_flush_async (GOutputStream *stream,
GTask *task;
FlushData *fdata;
fdata = g_slice_new (FlushData);
fdata = g_slice_new0 (FlushData);
fdata->flush_stream = TRUE;
fdata->close_stream = FALSE;
......@@ -732,7 +732,7 @@ g_buffered_output_stream_close_async (GOutputStream *stream,
GTask *task;
FlushData *fdata;
fdata = g_slice_new (FlushData);
fdata = g_slice_new0 (FlushData);
fdata->close_stream = TRUE;
task = g_task_new (stream, cancellable, callback, data);
......
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