mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 08:40:19 +00:00
audio/utils: Fix leak
Coverity CID 466491
This commit is contained in:
@@ -752,6 +752,7 @@ bool parse_channel_map_cfg(struct channel_map *channel_map, const char *cfg){
|
||||
}
|
||||
if(!isdigit(strchr(item, ':')[1])) {
|
||||
log_msg(LOG_LEVEL_ERROR, "Audio destination channel not entered!\n");
|
||||
free(tmp);
|
||||
return false;
|
||||
}
|
||||
int dst = atoi(strchr(item, ':') + 1);
|
||||
@@ -766,15 +767,15 @@ bool parse_channel_map_cfg(struct channel_map *channel_map, const char *cfg){
|
||||
}
|
||||
}
|
||||
|
||||
free(tmp);
|
||||
tmp = NULL;
|
||||
|
||||
if (!channel_map->validate()) {
|
||||
log_msg(LOG_LEVEL_ERROR, "Wrong audio mapping.\n");
|
||||
return false;
|
||||
}
|
||||
channel_map->compute_contributors();
|
||||
|
||||
free(tmp);
|
||||
tmp = NULL;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user