gvc-mixer-control: Fix memory leak on error path

When setting the headset port, make sure to also free the work data
if eol is negative, eg. if the call failed.
This commit is contained in:
Bastien Nocera 2016-02-22 14:03:54 +01:00
parent a28e23d900
commit 0a500795bd

View File

@ -2099,7 +2099,7 @@ sink_info_cb (pa_context *c,
int j; int j;
const char *s; const char *s;
if (eol) { if (eol <= 0) {
port_status_data_free (data); port_status_data_free (data);
return; return;
} }
@ -2135,7 +2135,7 @@ source_info_cb (pa_context *c,
int j; int j;
const char *s; const char *s;
if (eol) { if (eol <= 0) {
port_status_data_free (data); port_status_data_free (data);
return; return;
} }