pulse: Initialize pa_operation objects to all-zero.

state_callback and state_userdata fields were not initialized.
This commit is contained in:
Tanu Kaskinen 2013-01-13 03:15:23 +02:00
parent 6155af11d9
commit 7ab0885795

View file

@ -40,10 +40,11 @@ pa_operation *pa_operation_new(pa_context *c, pa_stream *s, pa_operation_cb_t cb
if (!(o = pa_flist_pop(PA_STATIC_FLIST_GET(operations)))) if (!(o = pa_flist_pop(PA_STATIC_FLIST_GET(operations))))
o = pa_xnew(pa_operation, 1); o = pa_xnew(pa_operation, 1);
pa_zero(*o);
PA_REFCNT_INIT(o); PA_REFCNT_INIT(o);
o->context = c; o->context = c;
o->stream = s; o->stream = s;
o->private = NULL;
o->state = PA_OPERATION_RUNNING; o->state = PA_OPERATION_RUNNING;
o->callback = cb; o->callback = cb;