From 25dcbd976d0465997b8f3fe77e2caebb0916a254 Mon Sep 17 00:00:00 2001 From: Karl Heyes Date: Tue, 2 Dec 2003 01:11:12 +0000 Subject: [PATCH] fix segv when fallback or dumpfilename are not specified svn path=/trunk/icecast/; revision=5675 --- src/source.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/source.c b/src/source.c index 0e2b92d1..c08d9735 100644 --- a/src/source.c +++ b/src/source.c @@ -72,9 +72,11 @@ source_t *source_create(client_t *client, connection_t *con, src->yp_public = 0; if(mountinfo != NULL) { - src->fallback_mount = strdup (mountinfo->fallback_mount); + if (mountinfo->fallback_mount != NULL) + src->fallback_mount = strdup (mountinfo->fallback_mount); src->max_listeners = mountinfo->max_listeners; - src->dumpfilename = strdup (mountinfo->dumpfile); + if (mountinfo->dumpfile != NULL) + src->dumpfilename = strdup (mountinfo->dumpfile); } if(src->dumpfilename != NULL) {