diff options
author | Bastien Nocera <hadess@hadess.net> | 2016-02-22 14:03:54 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2016-02-22 14:06:08 +0100 |
commit | 0a500795bde6254e14eda9be03904b7015a84146 (patch) | |
tree | 196d1dd73834b7465bd0e7c987fd505aafbc93cd | |
parent | a28e23d9006a32c8982ad8bda11fec131c6b36e8 (diff) | |
download | libgnome-volume-control-0a500795bde6254e14eda9be03904b7015a84146.tar.gz |
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.
-rw-r--r-- | gvc-mixer-control.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gvc-mixer-control.c b/gvc-mixer-control.c index ab3dbc9..5fb1f31 100644 --- a/gvc-mixer-control.c +++ b/gvc-mixer-control.c @@ -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; } |