mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-gtk
synced 2026-02-03 11:59:15 +00:00
vmc: Fix leak in spice_vmc_output_stream_write_finish()
We own a reference on the GAsyncResult returned by g_task_propage_pointer() so we have to g_object_unref() it when we no longer need it. Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
This commit is contained in:
parent
9f91b03bc4
commit
cbf9da900c
@ -399,9 +399,13 @@ spice_vmc_output_stream_write_finish(GOutputStream *stream,
|
||||
{
|
||||
SpiceVmcOutputStream *self = SPICE_VMC_OUTPUT_STREAM(stream);
|
||||
GAsyncResult *res = g_task_propagate_pointer(G_TASK(simple), error);
|
||||
gssize bytes_written;
|
||||
|
||||
SPICE_DEBUG("spicevmc write finish");
|
||||
return spice_vmc_write_finish(self->channel, res, error);
|
||||
bytes_written = spice_vmc_write_finish(self->channel, res, error);
|
||||
g_object_unref(res);
|
||||
|
||||
return bytes_written;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Loading…
Reference in New Issue
Block a user