mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2025-02-02 15:07:36 -05:00
Fix: Fixed re-configuration related memory leaks
This commit is contained in:
parent
76b33865c4
commit
75fc890963
24
src/source.c
24
src/source.c
@ -1172,23 +1172,19 @@ static void source_apply_mount (ice_config_t *config, source_t *source, mount_pr
|
|||||||
stats_event (source->mount, "authenticator", NULL);
|
stats_event (source->mount, "authenticator", NULL);
|
||||||
acl_release(acl);
|
acl_release(acl);
|
||||||
|
|
||||||
if (mountinfo && mountinfo->fallback_mount)
|
if (mountinfo && mountinfo->fallback_mount) {
|
||||||
{
|
util_replace_string(&(source->fallback_mount), mountinfo->fallback_mount);
|
||||||
char *mount = source->fallback_mount;
|
} else {
|
||||||
source->fallback_mount = strdup (mountinfo->fallback_mount);
|
free(source->fallback_mount);
|
||||||
free (mount);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
source->fallback_mount = NULL;
|
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;
|
source->dumpfilename = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (source->intro_file)
|
if (source->intro_file)
|
||||||
{
|
{
|
||||||
|
2
src/yp.c
2
src/yp.c
@ -796,6 +796,8 @@ static void yp_destroy_ypdata(ypdata_t *ypdata)
|
|||||||
free(ypdata->server_type);
|
free(ypdata->server_type);
|
||||||
free(ypdata->audio_info);
|
free(ypdata->audio_info);
|
||||||
free(ypdata->subtype);
|
free(ypdata->subtype);
|
||||||
|
free(ypdata->audio_samplerate);
|
||||||
|
free(ypdata->audio_channels);
|
||||||
free(ypdata->error_msg);
|
free(ypdata->error_msg);
|
||||||
free(ypdata);
|
free(ypdata);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user