From 2a991af1a6d8167d6dd4eee3fa9b517cc26e58df Mon Sep 17 00:00:00 2001 From: Karl Heyes Date: Fri, 20 Aug 2004 22:59:09 +0000 Subject: [PATCH] unlikely to occur race, but fix it anyway svn path=/icecast/trunk/icecast/; revision=7597 --- src/util.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/util.c b/src/util.c index c24cd064..86349d77 100644 --- a/src/util.c +++ b/src/util.c @@ -222,12 +222,11 @@ char *util_get_path_from_normalised_uri(char *uri) { ice_config_t *config = config_get_config(); webroot = config->webroot_dir; - config_release_config(); fullpath = malloc(strlen(uri) + strlen(webroot) + 1); - strcpy(fullpath, webroot); - - strcat(fullpath, uri); + if (fullpath) + sprintf (fullpath, "%s%s", webroot, uri); + config_release_config(); return fullpath; }