changeset 5773:4c6b5ab80de2

memory leak(off by 1 bug)
author iive
date Sun, 21 Apr 2002 16:56:19 +0000
parents cfb787b821a0
children a300966abeb6
files libao2/ao_plugin.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libao2/ao_plugin.c	Sun Apr 21 16:42:08 2002 +0000
+++ b/libao2/ao_plugin.c	Sun Apr 21 16:56:19 2002 +0000
@@ -71,7 +71,7 @@
 
   // Is this the last iteration or just another plugin
   if(cfg[cnt]=='\0'){
-    ao_plugin_local_data.plugins=malloc((i+1)*sizeof(ao_plugin_functions_t*));
+    ao_plugin_local_data.plugins=malloc((i+2)*sizeof(ao_plugin_functions_t*));
     if(ao_plugin_local_data.plugins){
       ao_plugin_local_data.plugins[i+1]=NULL;
       // Find the plugin matching the cfg string name