mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-31 22:25:35 -04:00
Misc fixes
Fixes of spots found via valgrind - non-freed chunks after snd_config_get_ascii() - zero-fill records (to make valgrind happy) - compile warning fixes
This commit is contained in:
parent
4bb0721a83
commit
ea77e08cc6
6 changed files with 20 additions and 5 deletions
|
|
@ -1080,9 +1080,11 @@ int _snd_pcm_dmix_open(snd_pcm_t **pcmp, const char *name,
|
|||
}
|
||||
if (isdigit(*perm) == 0) {
|
||||
SNDERR("The field ipc_perm must be a valid file permission");
|
||||
free(perm);
|
||||
return -EINVAL;
|
||||
}
|
||||
ipc_perm = strtol(perm, &endp, 8);
|
||||
free(perm);
|
||||
continue;
|
||||
}
|
||||
if (strcmp(id, "ipc_gid") == 0) {
|
||||
|
|
@ -1097,12 +1099,14 @@ int _snd_pcm_dmix_open(snd_pcm_t **pcmp, const char *name,
|
|||
struct group *grp = getgrnam(group);
|
||||
if (grp == NULL) {
|
||||
SNDERR("The field ipc_gid must be a valid group (create group %s)", group);
|
||||
free(group);
|
||||
return -EINVAL;
|
||||
}
|
||||
ipc_gid = grp->gr_gid;
|
||||
} else {
|
||||
ipc_perm = strtol(group, &endp, 10);
|
||||
}
|
||||
free(group);
|
||||
continue;
|
||||
}
|
||||
if (strcmp(id, "ipc_key_add_uid") == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue