pulse: Initialize pa_operation objects to all-zero.
authorTanu Kaskinen <tanuk@iki.fi>
Sun, 13 Jan 2013 01:15:23 +0000 (03:15 +0200)
committerTanu Kaskinen <tanuk@iki.fi>
Sun, 13 Jan 2013 01:15:23 +0000 (03:15 +0200)
state_callback and state_userdata fields were not initialized.

src/pulse/operation.c

index 8fdbea7..917a8a9 100644 (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))))
         o = pa_xnew(pa_operation, 1);
 
+    pa_zero(*o);
+
     PA_REFCNT_INIT(o);
     o->context = c;
     o->stream = s;
-    o->private = NULL;
 
     o->state = PA_OPERATION_RUNNING;
     o->callback = cb;