[xiph-commits] r9542 - icecast/branches/kh/icecast/src
karl at svn.xiph.org
karl at svn.xiph.org
Fri Jul 1 18:47:56 PDT 2005
Author: karl
Date: 2005-07-01 18:47:51 -0700 (Fri, 01 Jul 2005)
New Revision: 9542
Modified:
icecast/branches/kh/icecast/src/admin.c
icecast/branches/kh/icecast/src/client.c
icecast/branches/kh/icecast/src/format.c
icecast/branches/kh/icecast/src/format_mp3.c
icecast/branches/kh/icecast/src/stats.c
icecast/branches/kh/icecast/src/xslt.c
Log:
small leaks plugged
Modified: icecast/branches/kh/icecast/src/admin.c
===================================================================
--- icecast/branches/kh/icecast/src/admin.c 2005-06-29 23:16:17 UTC (rev 9541)
+++ icecast/branches/kh/icecast/src/admin.c 2005-07-02 01:47:51 UTC (rev 9542)
@@ -301,6 +301,7 @@
"Content-Length: ";
xmlDocDumpFormatMemoryEnc (doc, &buff, &len, NULL, 1);
buf_len = strlen (http) + len + 20;
+ client_set_queue (client, NULL);
client->refbuf = refbuf_new (buf_len);
len = snprintf (client->refbuf->data, buf_len, "%s%d\r\n\r\n%s", http, len, buff);
client->refbuf->len = len;
@@ -1163,6 +1164,7 @@
ice_config_t *config = config_get_config ();
mount_proxy *mountinfo = config->mounts;
+ client_set_queue (client, NULL);
client->refbuf = refbuf_new (remaining);
buf = client->refbuf->data;
ret = snprintf (buf, remaining,
Modified: icecast/branches/kh/icecast/src/client.c
===================================================================
--- icecast/branches/kh/icecast/src/client.c 2005-06-29 23:16:17 UTC (rev 9541)
+++ icecast/branches/kh/icecast/src/client.c 2005-07-02 01:47:51 UTC (rev 9542)
@@ -100,7 +100,8 @@
if (client->con)
connection_close(client->con);
- httpp_destroy(client->parser);
+ if (client->parser)
+ httpp_destroy (client->parser);
global_lock ();
global.clients--;
Modified: icecast/branches/kh/icecast/src/format.c
===================================================================
--- icecast/branches/kh/icecast/src/format.c 2005-06-29 23:16:17 UTC (rev 9541)
+++ icecast/branches/kh/icecast/src/format.c 2005-07-02 01:47:51 UTC (rev 9542)
@@ -166,6 +166,7 @@
return -1;
}
/* source -> file fallback, need a refbuf for data */
+ client_set_queue (client, NULL);
refbuf = refbuf_new (4096);
client->refbuf = refbuf;
client->pos = refbuf->len;
Modified: icecast/branches/kh/icecast/src/format_mp3.c
===================================================================
--- icecast/branches/kh/icecast/src/format_mp3.c 2005-06-29 23:16:17 UTC (rev 9541)
+++ icecast/branches/kh/icecast/src/format_mp3.c 2005-07-02 01:47:51 UTC (rev 9542)
@@ -409,6 +409,8 @@
free (format_mp3->url_artist);
free (format_mp3->url_title);
refbuf_release (format_mp3->metadata);
+ if (format_mp3->read_data)
+ refbuf_release (format_mp3->read_data);
free(format_mp3);
free(plugin);
}
Modified: icecast/branches/kh/icecast/src/stats.c
===================================================================
--- icecast/branches/kh/icecast/src/stats.c 2005-06-29 23:16:17 UTC (rev 9541)
+++ icecast/branches/kh/icecast/src/stats.c 2005-07-02 01:47:51 UTC (rev 9542)
@@ -899,6 +899,7 @@
xslt_transform(doc, xslpath, client);
xmlFreeDoc(doc);
+ free (xslpath);
}
void stats_get_xml(xmlDocPtr *doc, int show_hidden)
Modified: icecast/branches/kh/icecast/src/xslt.c
===================================================================
--- icecast/branches/kh/icecast/src/xslt.c 2005-06-29 23:16:17 UTC (rev 9541)
+++ icecast/branches/kh/icecast/src/xslt.c 2005-07-02 01:47:51 UTC (rev 9542)
@@ -179,6 +179,7 @@
unsigned buf_len = strlen (http) + 20 + len;
client->respcode = 200;
+ client_set_queue (client, NULL);
client->refbuf = refbuf_new (buf_len);
snprintf (client->refbuf->data, buf_len, "%s%d\r\n\r\n%s", http, len, string);
fserve_add_client (client, NULL);
More information about the commits
mailing list