1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-06-23 06:25:24 +00:00

Fix: Fixed re-configuration related memory leaks

This commit is contained in:
Philipp Schafft 2022-03-22 13:54:54 +00:00
parent 76b33865c4
commit 75fc890963
2 changed files with 12 additions and 14 deletions

View File

@ -1172,23 +1172,19 @@ static void source_apply_mount (ice_config_t *config, source_t *source, mount_pr
stats_event (source->mount, "authenticator", NULL);
acl_release(acl);
if (mountinfo && mountinfo->fallback_mount)
{
char *mount = source->fallback_mount;
source->fallback_mount = strdup (mountinfo->fallback_mount);
free (mount);
}
else
if (mountinfo && mountinfo->fallback_mount) {
util_replace_string(&(source->fallback_mount), mountinfo->fallback_mount);
} else {
free(source->fallback_mount);
source->fallback_mount = NULL;
if (mountinfo && mountinfo->dumpfile)
{
char *filename = source->dumpfilename;
source->dumpfilename = strdup (mountinfo->dumpfile);
free (filename);
}
else
if (mountinfo && mountinfo->dumpfile) {
util_replace_string(&(source->dumpfilename), mountinfo->dumpfile);
} else {
free(source->dumpfilename);
source->dumpfilename = NULL;
}
if (source->intro_file)
{

View File

@ -796,6 +796,8 @@ static void yp_destroy_ypdata(ypdata_t *ypdata)
free(ypdata->server_type);
free(ypdata->audio_info);
free(ypdata->subtype);
free(ypdata->audio_samplerate);
free(ypdata->audio_channels);
free(ypdata->error_msg);
free(ypdata);
}