mirror of
https://gitlab.gnome.org/GNOME/libgnome-volume-control.git
synced 2024-11-27 11:40:49 -05:00
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:
parent
a28e23d900
commit
0a500795bd
@ -2099,7 +2099,7 @@ sink_info_cb (pa_context *c,
|
||||
int j;
|
||||
const char *s;
|
||||
|
||||
if (eol) {
|
||||
if (eol <= 0) {
|
||||
port_status_data_free (data);
|
||||
return;
|
||||
}
|
||||
@ -2135,7 +2135,7 @@ source_info_cb (pa_context *c,
|
||||
int j;
|
||||
const char *s;
|
||||
|
||||
if (eol) {
|
||||
if (eol <= 0) {
|
||||
port_status_data_free (data);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user