Esound memory leak (and PATCH)



Hello,

I think I have found a memory leak in the esd_get_all_info() function
contained in esdmgr.c. This patch seems to fix it.

--------begin
diff -u esdmgr.c~ esdmgr.c
--- esdmgr.c~	Tue Feb 16 10:54:58 1999
+++ esdmgr.c	Tue Jun  1 20:00:48 1999
@@ -181,6 +181,8 @@
 
     } while( player_info->source_id > 0 );
 
+    free( player_info );
+
     /* get the sample info */
     do 
     {
@@ -210,6 +212,8 @@
 	}
 
     } while( sample_info->sample_id > 0 );
+
+    free( sample_info );
 
     return info;
 }
--------end

Thanks,
John
--
John Ellis <johne@bellatlantic.net>
http://gqview.netpedia.net



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]