Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.1:Update
alsa
0018-UCM-fix-memory-leak-when-executing-cset-co...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0018-UCM-fix-memory-leak-when-executing-cset-commands.patch of Package alsa
From 516569bbba7eb0e03f2892a67d8559c4d0bcd17a Mon Sep 17 00:00:00 2001 From: Baek Chang <breakchange@gmail.com> Date: Tue, 3 May 2011 10:52:34 -0700 Subject: [PATCH 18/23] UCM: fix memory leak when executing cset commands fix memory leak when executing cset commands. snd_ctl_elem's are allocated, but never free'ed Signed-off-by: Takashi Iwai <tiwai@suse.de> --- src/ucm/main.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/src/ucm/main.c b/src/ucm/main.c index 86f29e3..f8ceeeb 100644 --- a/src/ucm/main.c +++ b/src/ucm/main.c @@ -173,7 +173,8 @@ static int execute_cset(snd_ctl_t *ctl, char *cset) pos = strrchr(cset, ' '); if (pos == NULL) { uc_error("undefined value for cset >%s<", cset); - return -EINVAL; + err = -EINVAL; + goto __fail; } *pos = '\0'; err = snd_ctl_ascii_elem_id_parse(id, cset); @@ -196,6 +197,14 @@ static int execute_cset(snd_ctl_t *ctl, char *cset) err = 0; __fail: *pos = ' '; + + if (id != NULL) + free(id); + if (value != NULL) + free(value); + if (info != NULL) + free(info); + return err; } -- 1.7.5.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor