[libgnome-volume-control] gvc-mixer-control: Fix memory leak on error path
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgnome-volume-control] gvc-mixer-control: Fix memory leak on error path
- Date: Mon, 22 Feb 2016 13:06:29 +0000 (UTC)
commit 0a500795bde6254e14eda9be03904b7015a84146
Author: Bastien Nocera <hadess hadess net>
Date: Mon Feb 22 14:03:54 2016 +0100
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.
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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]