First one is a simple typo on an error condition that would have likely caused issues if it ever cropped up.
Second issue is that port information is never actually freed if everything works fine.
pa_tagstruct_getu32(t, &i.ports[0][j].priority) < 0) {
pa_context_fail(o->context, PA_ERR_PROTOCOL);
- pa_xfree(i.ports);
pa_xfree(i.ports[0]);
+ pa_xfree(i.ports);
pa_proplist_free(i.proplist);
goto finish;
}
cb(o->context, &i, 0, o->userdata);
}
+ if (i.ports) {
+ pa_xfree(i.ports[0]);
+ pa_xfree(i.ports);
+ }
pa_proplist_free(i.proplist);
}
}
cb(o->context, &i, 0, o->userdata);
}
+ if (i.ports) {
+ pa_xfree(i.ports[0]);
+ pa_xfree(i.ports);
+ }
pa_proplist_free(i.proplist);
}
}