[xiph-cvs] cvs commit: icecast/src connection.c source.c
Karl Heyes
karl at xiph.org
Mon Dec 1 09:18:37 PST 2003
karl 03/12/01 12:18:37
Modified: src connection.c source.c
Log:
cleanup bad pointer access after config re-read
Revision Changes Path
1.79 +2 -1 icecast/src/connection.c
Index: connection.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/connection.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -r1.78 -r1.79
--- connection.c 25 Jul 2003 14:29:33 -0000 1.78
+++ connection.c 1 Dec 2003 17:18:37 -0000 1.79
@@ -442,7 +442,6 @@
config = config_get_config();
mountproxy = config->mounts;
thread_mutex_lock(&(config_locks()->mounts_lock));
- config_release_config();
while(mountproxy) {
if(!strcmp(mountproxy->mountname, mount)) {
@@ -459,6 +458,7 @@
if (format == FORMAT_ERROR) {
WARN1("Content-type \"%s\" not supported, dropping source", contenttype);
thread_mutex_unlock(&(config_locks()->mounts_lock));
+ config_release_config();
goto fail;
} else {
source = source_create(client, con, parser, mount,
@@ -471,6 +471,7 @@
source = source_create(client, con, parser, mount, format, mountinfo);
thread_mutex_unlock(&(config_locks()->mounts_lock));
}
+ config_release_config();
source->send_return = 1;
source->shutdown_rwlock = &_source_shutdown_rwlock;
<p><p>1.60 +3 -2 icecast/src/source.c
Index: source.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/source.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- source.c 24 Jul 2003 16:21:22 -0000 1.59
+++ source.c 1 Dec 2003 17:18:37 -0000 1.60
@@ -72,9 +72,9 @@
src->yp_public = 0;
if(mountinfo != NULL) {
- src->fallback_mount = mountinfo->fallback_mount;
+ src->fallback_mount = strdup (mountinfo->fallback_mount);
src->max_listeners = mountinfo->max_listeners;
- src->dumpfilename = mountinfo->dumpfile;
+ src->dumpfilename = strdup (mountinfo->dumpfile);
}
if(src->dumpfilename != NULL) {
@@ -140,6 +140,7 @@
free(source->mount);
free(source->fallback_mount);
+ free(source->dumpfilename);
client_destroy(source->client);
avl_tree_free(source->pending_tree, _free_client);
avl_tree_free(source->client_tree, _free_client);
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list