1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-11-03 04:17:17 -05:00

small leaks plugged

svn path=/icecast/branches/kh/icecast/; revision=9542
This commit is contained in:
Karl Heyes 2005-07-02 01:47:51 +00:00
parent d374d123be
commit 5676e0d902
6 changed files with 9 additions and 1 deletions

View File

@ -301,6 +301,7 @@ void admin_send_response(xmlDocPtr doc, client_t *client,
"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 @@ static void command_list_mounts(client_t *client, int response)
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,

View File

@ -100,7 +100,8 @@ void client_destroy(client_t *client)
if (client->con)
connection_close(client->con);
httpp_destroy(client->parser);
if (client->parser)
httpp_destroy (client->parser);
global_lock ();
global.clients--;

View File

@ -166,6 +166,7 @@ int format_check_file_buffer (source_t *source, client_t *client)
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;

View File

@ -409,6 +409,8 @@ static void format_mp3_free_plugin (format_plugin_t *plugin)
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);
}

View File

@ -899,6 +899,7 @@ void stats_transform_xslt(client_t *client, const char *uri)
xslt_transform(doc, xslpath, client);
xmlFreeDoc(doc);
free (xslpath);
}
void stats_get_xml(xmlDocPtr *doc, int show_hidden)

View File

@ -179,6 +179,7 @@ void xslt_transform(xmlDocPtr doc, const char *xslfilename, client_t *client)
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);