diff options
author | Gonglei <arei.gonglei@huawei.com> | 2015-06-23 09:01:10 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-07-08 13:11:01 +0200 |
commit | 2828a307232ffceeddec9feb6a87ac660b68b693 (patch) | |
tree | 50b5fe028cada33141b16b0f4e6fcadbff8658f9 /audio/ossaudio.c | |
parent | 800567a613510c77a55decac4d25fea154d1ee22 (diff) | |
download | qemu-2828a307232ffceeddec9feb6a87ac660b68b693.tar.gz qemu-2828a307232ffceeddec9feb6a87ac660b68b693.tar.bz2 qemu-2828a307232ffceeddec9feb6a87ac660b68b693.zip |
ossaudio: fix memory leak
Variable "conf" going out of scope leaks the storage
it points to in line 856.
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Message-Id: <1435021270-7768-1-git-send-email-arei.gonglei@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'audio/ossaudio.c')
-rw-r--r-- | audio/ossaudio.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/audio/ossaudio.c b/audio/ossaudio.c index 11e76a15a2..7dbe3332d8 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; |