mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
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>
This commit is contained in:
parent
800567a613
commit
2828a30723
1 changed files with 1 additions and 0 deletions
|
@ -853,6 +853,7 @@ static void *oss_audio_init (void)
|
||||||
|
|
||||||
if (access(conf->devpath_in, R_OK | W_OK) < 0 ||
|
if (access(conf->devpath_in, R_OK | W_OK) < 0 ||
|
||||||
access(conf->devpath_out, R_OK | W_OK) < 0) {
|
access(conf->devpath_out, R_OK | W_OK) < 0) {
|
||||||
|
g_free(conf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return conf;
|
return conf;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue