[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] ossaudio: fix memory leak
From: |
arei.gonglei |
Subject: |
[Qemu-devel] [PATCH] ossaudio: fix memory leak |
Date: |
Tue, 23 Jun 2015 09:01:10 +0800 |
From: Gonglei <address@hidden>
Variable "conf" going out of scope leaks the storage
it points to in line 856.
Signed-off-by: Gonglei <address@hidden>
---
audio/ossaudio.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/audio/ossaudio.c b/audio/ossaudio.c
index 11e76a1..7dbe333 100644
--- a/audio/ossaudio.c
+++ b/audio/ossaudio.c
@@ -853,6 +853,7 @@ static void *oss_audio_init (void)
if (access(conf->devpath_in, R_OK | W_OK) < 0 ||
access(conf->devpath_out, R_OK | W_OK) < 0) {
+ g_free(conf);
return NULL;
}
return conf;
--
1.7.12.4
- [Qemu-devel] [PATCH] ossaudio: fix memory leak,
arei.gonglei <=