diff gui/interface.c @ 32927:edb972e22021

Fix memory leak in appInitStruct(). The NumberOf{Main,Bar,Menu}Items members actually don't hold the number of items but the last index used. Therefore, the last item won't get freed so far. To set the correct "number" for the global external variable prior to using it, the function appResetStruct() has been added and is used in appInitStruct() as well.
author ib
date Thu, 03 Mar 2011 13:45:30 +0000
parents 1481268ccd30
children 15aecb36f23e
line wrap: on
line diff
--- a/gui/interface.c	Thu Mar 03 13:13:20 2011 +0000
+++ b/gui/interface.c	Thu Mar 03 13:45:30 2011 +0000
@@ -163,6 +163,8 @@
  guiIntfStruct.Balance=50.0f;
  guiIntfStruct.StreamType=-1;
 
+ appResetStruct();
+
  memset( &gtkEquChannels,0,sizeof( gtkEquChannels ) );
 #ifdef CONFIG_DXR3
  if ( !gtkDXR3Device ) gtkDXR3Device=strdup( "/dev/em8300-0" );