summaryrefslogtreecommitdiff
path: root/src/xine-engine/load_plugins.c
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-04-14 18:30:19 +0200
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-04-14 18:30:19 +0200
commitcb2dc09164a533fc544c59469f6f8bd7d1cc5e04 (patch)
treeb6681a749f382c15f1c84f554961a9c64bd13742 /src/xine-engine/load_plugins.c
parenta99bea5eb67de57de5aa3259b5b5432d4aaa9c1a (diff)
downloadxine-lib-cb2dc09164a533fc544c59469f6f8bd7d1cc5e04.tar.gz
xine-lib-cb2dc09164a533fc544c59469f6f8bd7d1cc5e04.tar.bz2
Use xine_xcalloc instead of xine_xmalloc when mutiplying the number of elements by the size of the single element.
(transplanted from 512894f517c423fed0cadeca0d46c6d909403106) --HG-- extra : transplant_source : Q%28%94%F5%17%C4%23%FE%D0%CA%DE%CA%0DF%C6%D9%09%401%06
Diffstat (limited to 'src/xine-engine/load_plugins.c')
-rw-r--r--src/xine-engine/load_plugins.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c
index 30077a38e..b0557a4c7 100644
--- a/src/xine-engine/load_plugins.c
+++ b/src/xine-engine/load_plugins.c
@@ -945,7 +945,7 @@ static void load_plugin_list(FILE *fp, xine_sarray_t *plugins) {
file = xine_xmalloc(sizeof(plugin_file_t));
node->file = file;
file->filename = strdup(line+1);
- node->info = xine_xmalloc(2*sizeof(plugin_info_t));
+ node->info = xine_xcalloc(2, sizeof(plugin_info_t));
node->info[1].type = PLUGIN_NONE;
decoder_info = NULL;
vo_info = NULL;
@@ -1029,7 +1029,7 @@ static void load_plugin_list(FILE *fp, xine_sarray_t *plugins) {
for( s = value, i = 0; s && sscanf(s," %lu",&lu) > 0; i++ ) {
s = strchr(s+1, ' ');
}
- decoder_info->supported_types = xine_xmalloc((i+1)*sizeof(uint32_t));
+ decoder_info->supported_types = xine_xcalloc((i+1), sizeof(uint32_t));
for( s = value, i = 0; s && sscanf(s," %lu",&lu) > 0; i++ ) {
decoder_info->supported_types[i] = lu;
s = strchr(s+1, ' ');