val = NULL;
snd_config_get_ascii(pcm_conf, &val);
SNDERR("Invalid type for PCM %s%sdefinition (id: %s, value: %s)", name ? name : "", name ? " " : "", id, val);
- if (val)
- free(val);
+ free(val);
return -EINVAL;
}
err = snd_config_search(pcm_conf, "type", &conf);
if (server)
unlink(filename);
+ memset(addr, 0, size); /* make valgrind happy */
addr->sun_family = AF_LOCAL;
memcpy(addr->sun_path, filename, l);
return snd_timer_async(dmix->timer, sig, pid);
}
-static inline void process_timer_event(snd_pcm_direct_t *dmix, snd_timer_tread_t *te)
+static inline void process_timer_event(snd_pcm_direct_t *dmix ATTRIBUTE_UNUSED,
+ snd_timer_tread_t *te ATTRIBUTE_UNUSED)
{
#if 0
printf("te->event = %i\n", te->event);
}
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) {
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) {
}
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) {
if (isdigit(*group) == 0) {
struct group *grp = getgrnam(group);
if (group == NULL) {
- SNDERR("The field ipc_gid must be a valid group (create group %s)", grp);
+ 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) {
}
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) {
if (isdigit(*group) == 0) {
struct group *grp = getgrnam(group);
if (group == NULL) {
- SNDERR("The field ipc_gid must be a valid group (create group %s)", grp);
+ 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) {
}
if (isdigit(*str) == 0) {
SNDERR("The field perm must be a valid file permission");
+ free(str);
return -EINVAL;
}
perm = strtol(str, &endp, 8);
+ free(str);
continue;
}
SNDERR("Unknown field %s", id);