[MPlayer-cvslog] r32624 - in trunk: TOOLS/vfw2menc.c gui/app.c gui/interface.c gui/mplayer/gtk/pl.c gui/mplayer/gtk/sb.c gui/mplayer/play.c gui/skin/font.c gui/win32/dialogs.c gui/win32/gui.c gui/win32/playlist.c g...

cboesch subversion at mplayerhq.hu
Sun Nov 14 10:12:35 CET 2010


Author: cboesch
Date: Sun Nov 14 10:12:34 2010
New Revision: 32624

Log:
Remove most of the NULL pointer check before free all over the code

Modified:
   trunk/TOOLS/vfw2menc.c
   trunk/gui/app.c
   trunk/gui/interface.c
   trunk/gui/mplayer/gtk/pl.c
   trunk/gui/mplayer/gtk/sb.c
   trunk/gui/mplayer/play.c
   trunk/gui/skin/font.c
   trunk/gui/win32/dialogs.c
   trunk/gui/win32/gui.c
   trunk/gui/win32/playlist.c
   trunk/gui/win32/skinload.c
   trunk/input/ar.c
   trunk/input/input.c
   trunk/input/lirc.c
   trunk/libaf/af.c
   trunk/libaf/af_center.c
   trunk/libaf/af_comp.c
   trunk/libaf/af_delay.c
   trunk/libaf/af_dummy.c
   trunk/libaf/af_equalizer.c
   trunk/libaf/af_export.c
   trunk/libaf/af_extrastereo.c
   trunk/libaf/af_gate.c
   trunk/libaf/af_hrtf.c
   trunk/libaf/af_karaoke.c
   trunk/libaf/af_ladspa.c
   trunk/libaf/af_pan.c
   trunk/libaf/af_resample.c
   trunk/libaf/af_sinesuppress.c
   trunk/libaf/af_sub.c
   trunk/libaf/af_surround.c
   trunk/libaf/af_sweep.c
   trunk/libaf/af_volnorm.c
   trunk/libaf/af_volume.c
   trunk/libao2/ao_coreaudio.c
   trunk/libao2/ao_pcm.c
   trunk/libao2/ao_sun.c
   trunk/libao2/audio_out.c
   trunk/libmenu/menu.c
   trunk/libmenu/menu_cmdlist.c
   trunk/libmenu/menu_console.c
   trunk/libmenu/menu_filesel.c
   trunk/libmenu/menu_param.c
   trunk/libmpcodecs/ad_mpc.c
   trunk/libmpcodecs/ad_speex.c
   trunk/libmpcodecs/dec_teletext.c
   trunk/libmpcodecs/mp_image.c
   trunk/libmpcodecs/vd_ffmpeg.c
   trunk/libmpcodecs/vd_libmpeg2.c
   trunk/libmpcodecs/vd_realvid.c
   trunk/libmpcodecs/vd_xanim.c
   trunk/libmpcodecs/ve_nuv.c
   trunk/libmpcodecs/ve_xvid4.c
   trunk/libmpcodecs/vf_ass.c
   trunk/libmpcodecs/vf_blackframe.c
   trunk/libmpcodecs/vf_denoise3d.c
   trunk/libmpcodecs/vf_eq.c
   trunk/libmpcodecs/vf_fspp.c
   trunk/libmpcodecs/vf_geq.c
   trunk/libmpcodecs/vf_hqdn3d.c
   trunk/libmpcodecs/vf_hue.c
   trunk/libmpcodecs/vf_lavc.c
   trunk/libmpcodecs/vf_mcdeint.c
   trunk/libmpcodecs/vf_noise.c
   trunk/libmpcodecs/vf_perspective.c
   trunk/libmpcodecs/vf_pp7.c
   trunk/libmpcodecs/vf_qp.c
   trunk/libmpcodecs/vf_sab.c
   trunk/libmpcodecs/vf_scale.c
   trunk/libmpcodecs/vf_screenshot.c
   trunk/libmpcodecs/vf_spp.c
   trunk/libmpcodecs/vf_unsharp.c
   trunk/libmpcodecs/vf_uspp.c
   trunk/libmpdemux/asfheader.c
   trunk/libmpdemux/demux_aac.c
   trunk/libmpdemux/demux_asf.c
   trunk/libmpdemux/demux_audio.c
   trunk/libmpdemux/demux_film.c
   trunk/libmpdemux/demux_fli.c
   trunk/libmpdemux/demux_mf.c
   trunk/libmpdemux/demux_mng.c
   trunk/libmpdemux/demux_mpc.c
   trunk/libmpdemux/demux_mpg.c
   trunk/libmpdemux/demux_nsv.c
   trunk/libmpdemux/demux_ogg.c
   trunk/libmpdemux/demux_pva.c
   trunk/libmpdemux/demux_real.c
   trunk/libmpdemux/demux_realaud.c
   trunk/libmpdemux/demux_roq.c
   trunk/libmpdemux/demux_rtp_codec.cpp
   trunk/libmpdemux/demux_ts.c
   trunk/libmpdemux/demux_viv.c
   trunk/libmpdemux/demuxer.h
   trunk/libmpdemux/muxer_mpeg.c
   trunk/libvo/gl_common.c
   trunk/libvo/video_out.c
   trunk/libvo/vo_aa.c
   trunk/libvo/vo_corevideo.m
   trunk/libvo/vo_cvidix.c
   trunk/libvo/vo_directx.c
   trunk/libvo/vo_dxr2.c
   trunk/libvo/vo_dxr3.c
   trunk/libvo/vo_fbdev.c
   trunk/libvo/vo_fbdev2.c
   trunk/libvo/vo_ggi.c
   trunk/libvo/vo_gif89a.c
   trunk/libvo/vo_gl.c
   trunk/libvo/vo_gl2.c
   trunk/libvo/vo_jpeg.c
   trunk/libvo/vo_md5sum.c
   trunk/libvo/vo_png.c
   trunk/libvo/vo_pnm.c
   trunk/libvo/vo_winvidix.c
   trunk/libvo/vo_xvidix.c
   trunk/libvo/vo_yuv4mpeg.c
   trunk/libvo/vo_zr.c
   trunk/loader/afl.c
   trunk/loader/dshow/cmediasample.c
   trunk/loader/dshow/inputpin.c
   trunk/loader/dshow/outputpin.c
   trunk/loader/ext.c
   trunk/loader/ldt_keeper.c
   trunk/loader/pe_image.c
   trunk/loader/registry.c
   trunk/mplayer.c
   trunk/osdep/macosx_finder_args.c
   trunk/stream/freesdp/parser.c
   trunk/stream/librtsp/rtsp.c
   trunk/stream/librtsp/rtsp_rtp.c
   trunk/stream/librtsp/rtsp_session.c
   trunk/stream/realrtsp/real.c
   trunk/stream/realrtsp/rmff.c
   trunk/stream/realrtsp/sdpplin.c
   trunk/sub/sub.c
   trunk/vidix/ivtv_vid.c

Modified: trunk/TOOLS/vfw2menc.c
==============================================================================
--- trunk/TOOLS/vfw2menc.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/TOOLS/vfw2menc.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -295,9 +295,9 @@ int main(int argc, char *argv[])
     }
 
 cleanup:
-    if (driver) free(driver);
-    if (fourcc) free(fourcc);
-    if (filename) free(filename);
+    free(driver);
+    free(fourcc);
+    free(filename);
     if (hDriver) CloseDriver(hDriver, 0, 0);
     if ((coinit == S_OK) || coinit == S_FALSE) CoUninitialize();
     return ret;

Modified: trunk/gui/app.c
==============================================================================
--- trunk/gui/app.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/gui/app.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -108,11 +108,12 @@ void appClearItem( wItem * item )
  item->tmp=0;
  item->key=0; item->key2=0;
  item->Bitmap.Width=0; item->Bitmap.Height=0; item->Bitmap.BPP=0; item->Bitmap.ImageSize=0;
- if ( item->Bitmap.Image ) free( item->Bitmap.Image );
+ free(item->Bitmap.Image);
  item->Bitmap.Image=NULL;
 // ---
  item->fontid=0;
- if ( item->label ) free( item->label ); item->label=NULL;
+ free(item->label);
+ item->label=NULL;
  item->event=0;
 }
 

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/gui/interface.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -104,7 +104,6 @@ char * gstrchr( char * str,int c )
 
 void gfree( void ** p )
 {
- if ( *p == NULL ) return;
  free( *p ); *p=NULL;
 }
 
@@ -363,19 +362,19 @@ void guiLoadFont( void )
  if ( vo_font )
   {
    int i;
-   if ( vo_font->name ) free( vo_font->name );
-   if ( vo_font->fpath ) free( vo_font->fpath );
+   free( vo_font->name );
+   free( vo_font->fpath );
    for ( i=0;i<16;i++ )
     if ( vo_font->pic_a[i] )
      {
-      if ( vo_font->pic_a[i]->bmp ) free( vo_font->pic_a[i]->bmp );
-      if ( vo_font->pic_a[i]->pal ) free( vo_font->pic_a[i]->pal );
+      free( vo_font->pic_a[i]->bmp );
+      free( vo_font->pic_a[i]->pal );
      }
    for ( i=0;i<16;i++ )
     if ( vo_font->pic_b[i] )
      {
-      if ( vo_font->pic_b[i]->bmp ) free( vo_font->pic_b[i]->bmp );
-      if ( vo_font->pic_b[i]->pal ) free( vo_font->pic_b[i]->pal );
+      free( vo_font->pic_b[i]->bmp );
+      free( vo_font->pic_b[i]->pal );
      }
    free( vo_font ); vo_font=NULL;
   }
@@ -968,8 +967,8 @@ void * gtkSet( int cmd,float fparam, voi
 	   plList=curr->next;
 	 plCurrent=curr->next;
 	 // Free it
-	 if ( curr->path ) free( curr->path );
-	 if ( curr->name ) free( curr->name );
+	 free( curr->path );
+	 free( curr->name );
 	 free( curr );
         }
 	mplCurr(); // Instead of using mplNext && mplPrev
@@ -982,8 +981,8 @@ void * gtkSet( int cmd,float fparam, voi
 	 if ( !plList ) return NULL;
 	 if ( !curr->next )
 	  {
-	   if ( curr->path ) free( curr->path );
-	   if ( curr->name ) free( curr->name );
+	   free( curr->path );
+	   free( curr->name );
 	   free( curr );
 	  }
 	  else
@@ -991,8 +990,8 @@ void * gtkSet( int cmd,float fparam, voi
 	    while ( curr->next )
 	     {
 	      next=curr->next;
-	      if ( curr->path ) free( curr->path );
-	      if ( curr->name ) free( curr->name );
+	      free( curr->path );
+	      free( curr->name );
 	      free( curr );
 	      curr=next;
 	     }

Modified: trunk/gui/mplayer/gtk/pl.c
==============================================================================
--- trunk/gui/mplayer/gtk/pl.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/gui/mplayer/gtk/pl.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -160,7 +160,8 @@ void ShowPlayList( void )
 	DirNode=gtk_ctree_node_get_row_data( GTK_CTREE( CTDirTree ),node );
 	current_path=DirNode->path;
         scan_dir( DirNode->path );
-        if ( CLFileSelected ) free( CLFileSelected ); CLFileSelected=calloc( 1,NrOfEntrys * sizeof( int ) );
+	free( CLFileSelected );
+	CLFileSelected=calloc( 1,NrOfEntrys * sizeof( int ) );
 	break;
        }
     } while( pos );
@@ -195,7 +196,8 @@ void HidePlayList( void )
  if ( !PlayList ) return;
  NrOfSelected=NrOfEntrys=0;
  gfree( (void **)&CLListSelected ); gfree( (void **)&CLFileSelected );
- if ( old_path ) free( old_path ); old_path=strdup( current_path );
+ free( old_path );
+ old_path=strdup( current_path );
  gtk_widget_hide( PlayList );
  gtk_widget_destroy( PlayList );
  PlayList=NULL;
@@ -406,7 +408,8 @@ static void plCTRow(GtkWidget * widget, 
  current_path=DirNode->path;
  gtk_ctree_expand( GTK_CTREE( widget ),node );
  scan_dir( DirNode->path );
- if ( CLFileSelected ) free( CLFileSelected ); CLFileSelected=calloc( 1,NrOfEntrys * sizeof( int ) );
+ free( CLFileSelected );
+ CLFileSelected=calloc( 1,NrOfEntrys * sizeof( int ) );
 }
 
 GtkWidget * create_PlayList( void )

Modified: trunk/gui/mplayer/gtk/sb.c
==============================================================================
--- trunk/gui/mplayer/gtk/sb.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/gui/mplayer/gtk/sb.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -102,7 +102,7 @@ static void prButton( GtkObject * object
 	break;
    case 1: // ok
 	ChangeSkin( sbSelectedSkin );
-	if ( skinName ) free( skinName );
+	free( skinName );
 	skinName=strdup( sbSelectedSkin );
 	break;
   }
@@ -122,7 +122,7 @@ static void on_SkinList_select_row( GtkC
  if( !bevent ) return;
  if( bevent->type == GDK_2BUTTON_PRESS )
   {
-   if ( skinName ) free( skinName );
+   free( skinName );
    skinName=strdup( sbSelectedSkin );
    HideSkinBrowser();
   }

Modified: trunk/gui/mplayer/play.c
==============================================================================
--- trunk/gui/mplayer/play.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/gui/mplayer/play.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -206,7 +206,7 @@ void ChangeSkin( char * name )
 
  if ( prev && appMPlayer.menuIsPresent )
   {
-   if ( mplMenuDrawBuffer ) free( mplMenuDrawBuffer );
+   free( mplMenuDrawBuffer );
    if ( ( mplMenuDrawBuffer = calloc( 1,appMPlayer.menuBase.Bitmap.ImageSize ) ) == NULL )
     { mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_NEMDB ); return; }
    wsResizeWindow( &appMPlayer.menuWindow,appMPlayer.menuBase.width,appMPlayer.menuBase.height );
@@ -236,7 +236,7 @@ void ChangeSkin( char * name )
  mplPBInit();
 
 // --- reload main window
- if ( mplDrawBuffer ) free( mplDrawBuffer );
+ free( mplDrawBuffer );
  if ( ( mplDrawBuffer = calloc( 1,appMPlayer.main.Bitmap.ImageSize ) ) == NULL )
   { mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_NEMDB ); return; }
 

Modified: trunk/gui/skin/font.c
==============================================================================
--- trunk/gui/skin/font.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/gui/skin/font.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -59,7 +59,7 @@ void fntFreeFont( void )
   {
    if ( Fonts[i] )
     {
-     if ( Fonts[i]->Bitmap.Image ) free( Fonts[i]->Bitmap.Image );
+     free( Fonts[i]->Bitmap.Image );
      free( Fonts[i] );
      Fonts[i]=NULL;
     }

Modified: trunk/gui/win32/dialogs.c
==============================================================================
--- trunk/gui/win32/dialogs.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/gui/win32/dialogs.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -709,7 +709,7 @@ static LRESULT CALLBACK SkinBrowserWndPr
                     if (len)
                     {
                         if (guiIntfStruct.Playing) guiGetEvent(guiCEvent, (void *) guiSetStop);
-                        if (skinName) free(skinName);
+                        free(skinName);
                         skinName = malloc(len + 1);
                         SendMessage(listbox, LB_GETTEXT, (WPARAM) index, (LPARAM) skinName);
                         /* fill out the full pathname to the skin */

Modified: trunk/gui/win32/gui.c
==============================================================================
--- trunk/gui/win32/gui.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/gui/win32/gui.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -1007,7 +1007,7 @@ static LRESULT CALLBACK EventProc(HWND h
                             if(GetFileAttributes(searchpath) != INVALID_FILE_ATTRIBUTES)
                             {
 #ifdef CONFIG_DVDREAD
-                                if (dvd_device) free(dvd_device);
+                                free(dvd_device);
                                 dvd_device = strdup(device + pos);
                                 dvd_title = dvd_chapter = dvd_angle = 1;
                                 handlemsg(hWnd, evPlayDVD);
@@ -1017,7 +1017,7 @@ static LRESULT CALLBACK EventProc(HWND h
                             if(GetFileAttributes(searchpath) != INVALID_FILE_ATTRIBUTES)
                             {
 #ifdef CONFIG_LIBCDIO
-                                if (cdrom_device) free(cdrom_device);
+                                free(cdrom_device);
                                 cdrom_device = strdup(device + pos);
                                 /* mplayer doesn't seem to like the trailing \ after the device name */
                                 cdrom_device[2]=0;
@@ -1422,7 +1422,7 @@ int create_window(gui_t *gui, char *skin
     {
         mp_msg(MSGT_GPLAYER, MSGL_FATAL, "[GUI] fatal error during skinload\n");
         /* Set default Skin */
-        if (skinName) free(skinName);
+        free(skinName);
         skinName = strdup("Blue");
         /* then force write conf */
         cfg_write();

Modified: trunk/gui/win32/playlist.c
==============================================================================
--- trunk/gui/win32/playlist.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/gui/win32/playlist.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -88,9 +88,9 @@ static void remove_track(playlist_t *pla
         }
         else
         {
-            if(tmp[i]->filename) free(tmp[i]->filename);
-            if(tmp[i]->artist) free(tmp[i]->artist);
-            if(tmp[i]->title) free(tmp[i]->title);
+            free(tmp[i]->filename);
+            free(tmp[i]->artist);
+            free(tmp[i]->title);
             free(tmp[i]);
         }
     }

Modified: trunk/gui/win32/skinload.c
==============================================================================
--- trunk/gui/win32/skinload.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/gui/win32/skinload.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -185,8 +185,8 @@ static void freeimages(skin_t *skin)
     {
         if(skin->images && skin->images[i])
         {
-            if(skin->images[i]->data) free(skin->images[i]->data);
-            if(skin->images[i]->name) free(skin->images[i]->name);
+            free(skin->images[i]->data);
+            free(skin->images[i]->name);
             free(skin->images[i]);
         }
     }
@@ -223,29 +223,21 @@ static char *findnextstring(char *temp, 
 static void freeskin(skin_t *skin)
 {
     unsigned int i;
-    if(skin->skindir)
-    {
-        free(skin->skindir);
-        skin->skindir = NULL;
-    }
+
+    free(skin->skindir);
+    skin->skindir = NULL;
 
     for (i=1; i<=skin->lastusedid; i++)
         skin->removewidget(skin, i);
 
-    if(skin->widgets)
-    {
-        free(skin->widgets);
-        skin->widgets = NULL;
-    }
+    free(skin->widgets);
+    skin->widgets = NULL;
 
     freeimages(skin);
     for(i=0; i<skin->windowcount; i++)
     {
-        if(skin->windows[i]->name)
-        {
-            free(skin->windows[i]->name);
-            skin->windows[i]->name = NULL;
-        }
+        free(skin->windows[i]->name);
+        skin->windows[i]->name = NULL;
         free(skin->windows[i]);
     }
 
@@ -255,17 +247,12 @@ static void freeskin(skin_t *skin)
     for (i=0; i<skin->fontcount; i++)
     {
         unsigned int x;
-        if(skin->fonts[i]->name)
-        {
-            free(skin->fonts[i]->name);
-            skin->fonts[i]->name = NULL;
-        }
 
-        if(skin->fonts[i]->id)
-        {
-            free(skin->fonts[i]->id);
-            skin->fonts[i]->id = NULL;
-        }
+        free(skin->fonts[i]->name);
+        skin->fonts[i]->name = NULL;
+
+        free(skin->fonts[i]->id);
+        skin->fonts[i]->id = NULL;
 
         for (x=0; x<skin->fonts[i]->charcount; x++)
         {
@@ -273,11 +260,8 @@ static void freeskin(skin_t *skin)
             skin->fonts[i]->chars[x] = NULL;
         }
 
-        if(skin->fonts[i]->chars)
-        {
-            free(skin->fonts[i]->chars);
-            skin->fonts[i]->chars = NULL;
-        }
+        free(skin->fonts[i]->chars);
+        skin->fonts[i]->chars = NULL;
 
         free(skin->fonts[i]);
         skin->fonts[i] = NULL;
@@ -301,8 +285,7 @@ static void removewidget(skin_t *skin, i
     {
         if(skin->widgets[i]->id == id)
         {
-            if(skin->widgets[i]->label)
-                free(skin->widgets[i]->label);
+            free(skin->widgets[i]->label);
             free(skin->widgets[i]);
             skin->widgets[i] = NULL;
         }

Modified: trunk/input/ar.c
==============================================================================
--- trunk/input/ar.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/input/ar.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -276,8 +276,7 @@ int mp_input_ar_init(void)
         (*queue)->addElement(queue, cookies[i], 0);
 
     // not used anymore
-    if (cookies != NULL)
-        free(cookies);
+    free(cookies);
 
     // Start data delivery to the queue.
     (*queue)->start(queue);
@@ -289,8 +288,7 @@ int mp_input_ar_init(void)
     return 0;
 
 mp_input_ar_init_error:
-    if (cookies != NULL)
-        free(cookies);
+    free(cookies);
     if (hidDeviceInterface != NULL) {
         if (*hidDeviceInterface != NULL) {
             (*hidDeviceInterface)->close(hidDeviceInterface);

Modified: trunk/input/input.c
==============================================================================
--- trunk/input/input.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/input/input.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -653,8 +653,7 @@ mp_input_rm_cmd_fd(int fd) {
     return;
   if(cmd_fds[i].close_func)
     cmd_fds[i].close_func(cmd_fds[i].fd);
-  if(cmd_fds[i].buffer)
-    free(cmd_fds[i].buffer);
+  free(cmd_fds[i].buffer);
 
   if(i + 1 < num_cmd_fd)
     memmove(&cmd_fds[i],&cmd_fds[i+1],(num_cmd_fd - i - 1)*sizeof(mp_input_fd_t));
@@ -1151,10 +1150,8 @@ interpret_key(int code, int paused)
     num_key_down--;
     last_key_down = 0;
     ar_state = -1;
-    if(ar_cmd) {
-      mp_cmd_free(ar_cmd);
-      ar_cmd = NULL;
-    }
+    mp_cmd_free(ar_cmd);
+    ar_cmd = NULL;
     return ret;
 }
 
@@ -1387,11 +1384,10 @@ mp_cmd_free(mp_cmd_t* cmd) {
 //#endif
   if ( !cmd ) return;
 
-  if(cmd->name)
-    free(cmd->name);
+  free(cmd->name);
 
   for(i=0; i < MP_CMD_MAX_ARGS && cmd->args[i].type != -1; i++) {
-    if(cmd->args[i].type == MP_CMD_ARG_STRING && cmd->args[i].v.s != NULL)
+    if(cmd->args[i].type == MP_CMD_ARG_STRING)
       free(cmd->args[i].v.s);
   }
   free(cmd);
@@ -1524,8 +1520,7 @@ mp_input_bind_keys(const int keys[MP_MAX
     memset(&bind_section->cmd_binds[i],0,2*sizeof(mp_cmd_bind_t));
     bind = &bind_section->cmd_binds[i];
   }
-  if(bind->cmd)
-    free(bind->cmd);
+  free(bind->cmd);
   bind->cmd = strdup(cmd);
   memcpy(bind->input,keys,(MP_MAX_KEY_DOWN+1)*sizeof(int));
 }
@@ -1701,7 +1696,7 @@ mp_input_set_section(char *name) {
 
   cmd_binds=NULL;
   cmd_binds_default=NULL;
-  if(section) free(section);
+  free(section);
   if(name) section=strdup(name); else section=strdup("default");
   if((bind_section=mp_input_get_bind_section(section)))
     cmd_binds=bind_section->cmd_binds;

Modified: trunk/input/lirc.c
==============================================================================
--- trunk/input/lirc.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/input/lirc.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -116,10 +116,8 @@ int mp_input_lirc_read(int fd,char* dest
 
 void
 mp_input_lirc_close(int fd) {
-  if(cmd_buf) {
-    free(cmd_buf);
-    cmd_buf = NULL;
-  }
+  free(cmd_buf);
+  cmd_buf = NULL;
   lirc_freeconfig(lirc_config);
   lirc_deinit();
 }

Modified: trunk/libaf/af.c
==============================================================================
--- trunk/libaf/af.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libaf/af.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -625,8 +625,7 @@ int af_resize_local_buffer(af_instance_t
   mp_msg(MSGT_AFILTER, MSGL_V, "[libaf] Reallocating memory in module %s, "
 	 "old len = %i, new len = %i\n",af->info->name,af->data->len,len);
   // If there is a buffer free it
-  if(af->data->audio)
-    free(af->data->audio);
+  free(af->data->audio);
   // Create new buffer and check that it is OK
   af->data->audio = malloc(len);
   if(!af->data->audio){

Modified: trunk/libaf/af_center.c
==============================================================================
--- trunk/libaf/af_center.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libaf/af_center.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -78,9 +78,7 @@ static int control(struct af_instance_s*
 // Deallocate memory
 static void uninit(struct af_instance_s* af)
 {
-  if(af->data)
     free(af->data);
-  if(af->setup)
     free(af->setup);
 }
 

Modified: trunk/libaf/af_comp.c
==============================================================================
--- trunk/libaf/af_comp.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libaf/af_comp.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -107,9 +107,7 @@ static int control(struct af_instance_s*
 // Deallocate memory
 static void uninit(struct af_instance_s* af)
 {
-  if(af->data)
     free(af->data);
-  if(af->setup)
     free(af->setup);
 }
 

Modified: trunk/libaf/af_delay.c
==============================================================================
--- trunk/libaf/af_delay.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libaf/af_delay.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -49,10 +49,8 @@ static int control(struct af_instance_s*
     int i;
 
     // Free prevous delay queues
-    for(i=0;i<af->data->nch;i++){
-      if(s->q[i])
-	free(s->q[i]);
-    }
+    for(i=0;i<af->data->nch;i++)
+      free(s->q[i]);
 
     af->data->rate   = ((af_data_t*)arg)->rate;
     af->data->nch    = ((af_data_t*)arg)->nch;
@@ -112,13 +110,11 @@ static int control(struct af_instance_s*
 static void uninit(struct af_instance_s* af)
 {
   int i;
-  if(af->data)
-    free(af->data);
+
+  free(af->data);
   for(i=0;i<AF_NCH;i++)
-    if(((af_delay_t*)(af->setup))->q[i])
       free(((af_delay_t*)(af->setup))->q[i]);
-  if(af->setup)
-    free(af->setup);
+  free(af->setup);
 }
 
 // Filter data through filter

Modified: trunk/libaf/af_dummy.c
==============================================================================
--- trunk/libaf/af_dummy.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libaf/af_dummy.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -41,7 +41,6 @@ static int control(struct af_instance_s*
 // Deallocate memory
 static void uninit(struct af_instance_s* af)
 {
-  if(af->data)
     free(af->data);
 }
 

Modified: trunk/libaf/af_equalizer.c
==============================================================================
--- trunk/libaf/af_equalizer.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libaf/af_equalizer.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -181,9 +181,7 @@ static int control(struct af_instance_s*
 // Deallocate memory
 static void uninit(struct af_instance_s* af)
 {
-  if(af->data)
     free(af->data);
-  if(af->setup)
     free(af->setup);
 }
 

Modified: trunk/libaf/af_export.c
==============================================================================
--- trunk/libaf/af_export.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libaf/af_export.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -73,7 +73,7 @@ static int control(struct af_instance_s*
     int mapsize;
 
     // Free previous buffers
-    if (s->buf && s->buf[0])
+    if (s->buf)
       free(s->buf[0]);
 
     // unmap previous area
@@ -136,8 +136,7 @@ static int control(struct af_instance_s*
     char *str = arg;
 
     if (!str){
-      if(s->filename)
-	free(s->filename);
+      free(s->filename);
 
       s->filename = get_path(SHARED_FILE);
       return AF_OK;
@@ -146,8 +145,7 @@ static int control(struct af_instance_s*
     while((str[i]) && (str[i] != ':'))
       i++;
 
-    if(s->filename)
-      free(s->filename);
+    free(s->filename);
 
     s->filename = calloc(i + 1, 1);
     memcpy(s->filename, str, i);
@@ -177,14 +175,12 @@ static int control(struct af_instance_s*
 */
 static void uninit( struct af_instance_s* af )
 {
-  if (af->data){
-    free(af->data);
-    af->data = NULL;
-  }
+  free(af->data);
+  af->data = NULL;
 
   if(af->setup){
     af_export_t* s = af->setup;
-    if (s->buf && s->buf[0])
+    if (s->buf)
       free(s->buf[0]);
 
     // Free mmaped area
@@ -194,8 +190,7 @@ static void uninit( struct af_instance_s
     if(s->fd > -1)
       close(s->fd);
 
-    if(s->filename)
-	free(s->filename);
+    free(s->filename);
 
     free(af->setup);
     af->setup = NULL;

Modified: trunk/libaf/af_extrastereo.c
==============================================================================
--- trunk/libaf/af_extrastereo.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libaf/af_extrastereo.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -82,9 +82,7 @@ static int control(struct af_instance_s*
 // Deallocate memory
 static void uninit(struct af_instance_s* af)
 {
-  if(af->data)
     free(af->data);
-  if(af->setup)
     free(af->setup);
 }
 

Modified: trunk/libaf/af_gate.c
==============================================================================
--- trunk/libaf/af_gate.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libaf/af_gate.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -102,9 +102,7 @@ static int control(struct af_instance_s*
 // Deallocate memory
 static void uninit(struct af_instance_s* af)
 {
-  if(af->data)
     free(af->data);
-  if(af->setup)
     free(af->setup);
 }
 

Modified: trunk/libaf/af_hrtf.c
==============================================================================
--- trunk/libaf/af_hrtf.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libaf/af_hrtf.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -349,32 +349,19 @@ static void uninit(struct af_instance_s 
     if(af->setup) {
 	af_hrtf_t *s = af->setup;
 
-	if(s->lf)
-	    free(s->lf);
-	if(s->rf)
-	    free(s->rf);
-	if(s->lr)
-	    free(s->lr);
-	if(s->rr)
-	    free(s->rr);
-	if(s->cf)
-	    free(s->cf);
-	if(s->cr)
-	    free(s->cr);
-	if(s->ba_l)
-	    free(s->ba_l);
-	if(s->ba_r)
-	    free(s->ba_r);
-	if(s->ba_ir)
-	    free(s->ba_ir);
-	if(s->fwrbuf_l)
-	   free(s->fwrbuf_l);
-	if(s->fwrbuf_r)
-	   free(s->fwrbuf_r);
-	if(s->fwrbuf_lr)
-	   free(s->fwrbuf_lr);
-	if(s->fwrbuf_rr)
-	   free(s->fwrbuf_rr);
+	free(s->lf);
+	free(s->rf);
+	free(s->lr);
+	free(s->rr);
+	free(s->cf);
+	free(s->cr);
+	free(s->ba_l);
+	free(s->ba_r);
+	free(s->ba_ir);
+	free(s->fwrbuf_l);
+	free(s->fwrbuf_r);
+	free(s->fwrbuf_lr);
+	free(s->fwrbuf_rr);
 	free(af->setup);
     }
     if(af->data)

Modified: trunk/libaf/af_karaoke.c
==============================================================================
--- trunk/libaf/af_karaoke.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libaf/af_karaoke.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -46,8 +46,7 @@ static int control(struct af_instance_s*
 // Deallocate memory
 static void uninit(struct af_instance_s* af)
 {
-	if(af->data)
-		free(af->data);
+	free(af->data);
 }
 
 // Filter data through filter

Modified: trunk/libaf/af_ladspa.c
==============================================================================
--- trunk/libaf/af_ladspa.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libaf/af_ladspa.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -563,7 +563,7 @@ static int control(struct af_instance_s 
 
         /* set new setup->myname */
 
-        if(setup->myname) free(setup->myname);
+        free(setup->myname);
         setup->myname = calloc(strlen(af_info_ladspa.name)+strlen(setup->file)+
                                                     strlen(setup->label)+6, 1);
         snprintf(setup->myname, strlen(af_info_ladspa.name)+
@@ -653,8 +653,7 @@ static int control(struct af_instance_s 
 static void uninit(struct af_instance_s *af) {
     int i;
 
-    if (af->data)
-        free(af->data);
+    free(af->data);
     if (af->setup) {
         af_ladspa_t *setup = (af_ladspa_t*) af->setup;
         const LADSPA_Descriptor *pdes = setup->plugin_descriptor;
@@ -672,36 +671,24 @@ static void uninit(struct af_instance_s 
             free(setup->chhandles);
         }
 
-        if (setup->file)
-            free(setup->file);
-        if (setup->label)
-            free(setup->label);
-        if (setup->inputcontrolsmap)
-            free(setup->inputcontrolsmap);
-        if (setup->inputcontrols)
-            free(setup->inputcontrols);
-        if (setup->outputcontrolsmap)
-            free(setup->outputcontrolsmap);
-        if (setup->outputcontrols)
-            free(setup->outputcontrols);
-        if (setup->inputs)
-            free(setup->inputs);
-        if (setup->outputs)
-            free(setup->outputs);
+        free(setup->file);
+        free(setup->label);
+        free(setup->inputcontrolsmap);
+        free(setup->inputcontrols);
+        free(setup->outputcontrolsmap);
+        free(setup->outputcontrols);
+        free(setup->inputs);
+        free(setup->outputs);
 
         if (setup->inbufs) {
-            for(i=0; i<setup->nch; i++) {
-                if (setup->inbufs[i])
-                    free(setup->inbufs[i]);
-            }
+            for(i=0; i<setup->nch; i++)
+                free(setup->inbufs[i]);
             free(setup->inbufs);
         }
 
         if (setup->outbufs) {
-            for(i=0; i<setup->nch; i++) {
-                if (setup->outbufs[i])
-                    free(setup->outbufs[i]);
-            }
+            for(i=0; i<setup->nch; i++)
+                free(setup->outbufs[i]);
             free(setup->outbufs);
         }
 
@@ -754,17 +741,13 @@ static af_data_t* play(struct af_instanc
                                                                 setup->myname);
 
             if(setup->inbufs) {
-                for(i=0; i<setup->nch; i++) {
-                    if(setup->inbufs[i])
-                        free(setup->inbufs[i]);
-                }
+                for(i=0; i<setup->nch; i++)
+                    free(setup->inbufs[i]);
                 free(setup->inbufs);
             }
             if(setup->outbufs) {
-                for(i=0; i<setup->nch; i++) {
-                    if(setup->outbufs[i])
-                        free(setup->outbufs[i]);
-                }
+                for(i=0; i<setup->nch; i++)
+                    free(setup->outbufs[i]);
                 free(setup->outbufs);
             }
         } /* everything is freed */

Modified: trunk/libaf/af_pan.c
==============================================================================
--- trunk/libaf/af_pan.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libaf/af_pan.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -144,8 +144,7 @@ static void uninit(struct af_instance_s*
   if(af->data)
     free(af->data->audio);
   free(af->data);
-  if(af->setup)
-    free(af->setup);
+  free(af->setup);
 }
 
 // Filter data through filter

Modified: trunk/libaf/af_resample.c
==============================================================================
--- trunk/libaf/af_resample.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libaf/af_resample.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -236,8 +236,7 @@ static int control(struct af_instance_s*
       fc = 1/(float)(max(s->up,s->dn));
       // Allocate space for polyphase filter bank and prototype filter
       w = malloc(sizeof(float) * s->up *L);
-      if(NULL != s->w)
-	free(s->w);
+      free(s->w);
       s->w = malloc(L*s->up*af->data->bps);
 
       // Design prototype filter type using Kaiser window with beta = 10

Modified: trunk/libaf/af_sinesuppress.c
==============================================================================
--- trunk/libaf/af_sinesuppress.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libaf/af_sinesuppress.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -98,9 +98,7 @@ static int control(struct af_instance_s*
 // Deallocate memory
 static void uninit(struct af_instance_s* af)
 {
-  if(af->data)
     free(af->data);
-  if(af->setup)
     free(af->setup);
 }
 

Modified: trunk/libaf/af_sub.c
==============================================================================
--- trunk/libaf/af_sub.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libaf/af_sub.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -123,9 +123,7 @@ static int control(struct af_instance_s*
 // Deallocate memory
 static void uninit(struct af_instance_s* af)
 {
-  if(af->data)
     free(af->data);
-  if(af->setup)
     free(af->setup);
 }
 

Modified: trunk/libaf/af_surround.c
==============================================================================
--- trunk/libaf/af_surround.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libaf/af_surround.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -109,10 +109,8 @@ static int control(struct af_instance_s*
     }
 
     // Free previous delay queues
-    if(s->dl)
-      free(s->dl);
-    if(s->dr)
-      free(s->dr);
+    free(s->dl);
+    free(s->dr);
     // Allocate new delay queues
     s->dl = calloc(LD,af->data->bps);
     s->dr = calloc(LD,af->data->bps);

Modified: trunk/libaf/af_sweep.c
==============================================================================
--- trunk/libaf/af_sweep.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libaf/af_sweep.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -60,12 +60,8 @@ static int control(struct af_instance_s*
 // Deallocate memory
 static void uninit(struct af_instance_s* af)
 {
-    if(af->data)
-        free(af->data);
-    if(af->setup){
-        af_sweept *s = af->setup;
-        free(s);
-    }
+    free(af->data);
+    free(af->setup);
 }
 
 // Filter data through filter

Modified: trunk/libaf/af_volnorm.c
==============================================================================
--- trunk/libaf/af_volnorm.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libaf/af_volnorm.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -116,9 +116,7 @@ static int control(struct af_instance_s*
 // Deallocate memory
 static void uninit(struct af_instance_s* af)
 {
-  if(af->data)
     free(af->data);
-  if(af->setup)
     free(af->setup);
 }
 

Modified: trunk/libaf/af_volume.c
==============================================================================
--- trunk/libaf/af_volume.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libaf/af_volume.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -133,9 +133,7 @@ static int control(struct af_instance_s*
 // Deallocate memory
 static void uninit(struct af_instance_s* af)
 {
-  if(af->data)
     free(af->data);
-  if(af->setup)
     free(af->setup);
 }
 

Modified: trunk/libao2/ao_coreaudio.c
==============================================================================
--- trunk/libao2/ao_coreaudio.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libao2/ao_coreaudio.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -728,7 +728,7 @@ static int OpenSPDIF(void)
                     ao_msg(MSGT_AO, MSGL_WARN,
                            "Could not retrieve the original stream format: [%4.4s]\n",
                            (char *)&err);
-                    if (p_format_list) free(p_format_list);
+                    free(p_format_list);
                     continue;
                 }
                 ao->b_revert = 1;
@@ -755,9 +755,9 @@ static int OpenSPDIF(void)
                 ao->stream_format = p_format_list[i_current_rate_format];
             else ao->stream_format = p_format_list[i_backup_rate_format]; /* And if we have to, any digital format will be just fine (highest rate possible). */
         }
-        if (p_format_list) free(p_format_list);
+        free(p_format_list);
     }
-    if (p_streams) free(p_streams);
+    free(p_streams);
 
     if (ao->i_stream_index < 0)
     {

Modified: trunk/libao2/ao_pcm.c
==============================================================================
--- trunk/libao2/ao_pcm.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libao2/ao_pcm.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -218,8 +218,7 @@ static void uninit(int immed){
         }
     }
     fclose(fp);
-    if (ao_outputfilename)
-        free(ao_outputfilename);
+    free(ao_outputfilename);
     ao_outputfilename = NULL;
 }
 

Modified: trunk/libao2/ao_sun.c
==============================================================================
--- trunk/libao2/ao_sun.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libao2/ao_sun.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -228,7 +228,7 @@ static int realtime_samplecounter_availa
 
 
 error:
-    if (silence != NULL) free(silence);
+    free(silence);
     if (fd >= 0) {
 	// remove the 0 bytes from the above measurement from the
 	// audio driver's STREAMS queue

Modified: trunk/libao2/audio_out.c
==============================================================================
--- trunk/libao2/audio_out.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libao2/audio_out.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -149,10 +149,8 @@ const ao_functions_t* init_best_audio_ou
             mp_msg(MSGT_AO, MSGL_FATAL, MSGTR_AO_ALSA9_1x_Removed);
             exit_player(EXIT_NONE);
         }
-        if (ao_subdevice) {
-            free(ao_subdevice);
-            ao_subdevice = NULL;
-        }
+        free(ao_subdevice);
+        ao_subdevice = NULL;
         ao_subdevice=strchr(ao,':');
         if(ao_subdevice){
             ao_len = ao_subdevice - ao;
@@ -181,10 +179,8 @@ const ao_functions_t* init_best_audio_ou
         ++ao_list;
         if(!(ao_list[0])) return NULL; // do NOT fallback to others
       }
-    if (ao_subdevice) {
-        free(ao_subdevice);
-        ao_subdevice = NULL;
-    }
+    free(ao_subdevice);
+    ao_subdevice = NULL;
 
     mp_msg(MSGT_AO, MSGL_V, MSGTR_AO_TryingEveryKnown);
 

Modified: trunk/libmenu/menu.c
==============================================================================
--- trunk/libmenu/menu.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmenu/menu.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -124,7 +124,7 @@ static int menu_parse_config(char* buffe
     if(!name) {
       mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_MenuDefinitionsNeedANameAttrib,parser->line);
       free(element);
-      if(body) free(body);
+      free(body);
       asx_free_attribs(attribs);
       continue;
     }
@@ -215,7 +215,7 @@ static int menu_parse_config(char* buffe
     } else {
       mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_UnknownMenuType,element,parser->line);
       free(name);
-      if(body) free(body);
+      free(body);
     }
 
     free(element);
@@ -279,7 +279,7 @@ void menu_uninit(void) {
   for(i = 0 ; menu_list && menu_list[i].name ; i++) {
     free(menu_list[i].name);
     m_struct_free(&menu_list[i].type->priv_st,menu_list[i].cfg);
-    if(menu_list[i].args) free(menu_list[i].args);
+    free(menu_list[i].args);
   }
   free(menu_list);
   menu_count = 0;

Modified: trunk/libmenu/menu_cmdlist.c
==============================================================================
--- trunk/libmenu/menu_cmdlist.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmenu/menu_cmdlist.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -94,14 +94,10 @@ static void read_cmd(menu_t* menu,int cm
 }
 
 static void free_entry(list_entry_t* entry) {
-  if(entry->ok)
-    free(entry->ok);
-  if(entry->cancel)
-    free(entry->cancel);
-  if(entry->left)
-    free(entry->left);
-  if(entry->right)
-    free(entry->right);
+  free(entry->ok);
+  free(entry->cancel);
+  free(entry->left);
+  free(entry->right);
   free(entry->p.txt);
   free(entry);
 }
@@ -133,7 +129,7 @@ static int parse_args(menu_t* menu,char*
     if(!name) {
       mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_ListMenuEntryDefinitionsNeedAName,parser->line);
       free(element);
-      if(body) free(body);
+      free(body);
       asx_free_attribs(attribs);
       continue;
     }
@@ -146,7 +142,7 @@ static int parse_args(menu_t* menu,char*
     menu_list_add_entry(menu,m);
 
     free(element);
-    if(body) free(body);
+    free(body);
     asx_free_attribs(attribs);
   }
 }

Modified: trunk/libmenu/menu_console.c
==============================================================================
--- trunk/libmenu/menu_console.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmenu/menu_console.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -142,7 +142,7 @@ static void add_line(struct menu_priv_s*
     return;
   }
 
-  if(priv->num_lines >= priv->buf_lines && priv->lines[priv->last_line])
+  if(priv->num_lines >= priv->buf_lines)
     free(priv->lines[priv->last_line]);
   else
     priv->num_lines++;

Modified: trunk/libmenu/menu_filesel.c
==============================================================================
--- trunk/libmenu/menu_filesel.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmenu/menu_filesel.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -240,8 +240,7 @@ static int open_dir(menu_t* menu,char* a
 
   menu_list_init(menu);
 
-  if(mpriv->dir)
-    free(mpriv->dir);
+  free(mpriv->dir);
   mpriv->dir = strdup(args);
   if(mpriv->p.title && mpriv->p.title != mpriv->title && mpriv->p.title != cfg_dflt.p.title)
     free(mpriv->p.title);

Modified: trunk/libmenu/menu_param.c
==============================================================================
--- trunk/libmenu/menu_param.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmenu/menu_param.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -84,7 +84,7 @@ static void entry_set_text(menu_t* menu,
     mp_property_print(e->prop, menu->ctx);
   int l,edit = (mpriv->edit && e == mpriv->p.current);
   if(!val || !val[0]) {
-    if(val) free(val);
+    free(val);
     if(mpriv->hide_na) {
       e->p.hide = 1;
       return;
@@ -93,7 +93,7 @@ static void entry_set_text(menu_t* menu,
   } else if(mpriv->hide_na)
       e->p.hide = 0;
   l = strlen(e->name) + 2 + strlen(val) + (edit ? 4 : 0) + 1;
-  if(e->p.txt) free(e->p.txt);
+  free(e->p.txt);
   e->p.txt = malloc(l);
   sprintf(e->p.txt,"%s: %s%s%s",e->name,edit ? "> " : "",val,edit ? " <" : "");
   free(val);
@@ -154,7 +154,8 @@ static int parse_args(menu_t* menu,char*
     txt = asx_get_attrib("txt",attribs);
     if(!(name || txt)) {
       mp_msg(MSGT_OSD_MENU,MSGL_WARN,MSGTR_LIBMENU_PrefMenuEntryDefinitionsNeed,parser->line);
-      if(txt) free(txt), txt = NULL;
+      free(txt);
+      txt = NULL;
       goto next_element;
     }
     m = calloc(1,sizeof(struct list_entry_s));
@@ -177,8 +178,8 @@ static int parse_args(menu_t* menu,char*
 
   next_element:
     free(element);
-    if(body) free(body);
-    if(name) free(name);
+    free(body);
+    free(name);
     asx_free_attribs(attribs);
   }
 }
@@ -254,10 +255,10 @@ static void read_cmd(menu_t* menu,int cm
 
 static void free_entry(list_entry_t* entry) {
   free(entry->p.txt);
-  if(entry->name) free(entry->name);
-  if(entry->txt)  free(entry->txt);
-  if(entry->prop) free(entry->prop);
-  if(entry->menu) free(entry->menu);
+  free(entry->name);
+  free(entry->txt);
+  free(entry->prop);
+  free(entry->menu);
   free(entry);
 }
 

Modified: trunk/libmpcodecs/ad_mpc.c
==============================================================================
--- trunk/libmpcodecs/ad_mpc.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/ad_mpc.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -121,8 +121,7 @@ static int preinit(sh_audio_t *sh) {
 }
 
 static void uninit(sh_audio_t *sh) {
-  if (sh->context)
-    free(sh->context);
+  free(sh->context);
   sh->context = NULL;
 }
 

Modified: trunk/libmpcodecs/ad_speex.c
==============================================================================
--- trunk/libmpcodecs/ad_speex.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/ad_speex.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -126,8 +126,7 @@ static void uninit(sh_audio_t *sh) {
   if (ctx) {
     speex_bits_destroy(&ctx->bits);
     speex_decoder_destroy(ctx->dec_context);
-    if (ctx->hdr)
-      free(ctx->hdr);
+    free(ctx->hdr);
     free(ctx);
   }
   ctx = NULL;

Modified: trunk/libmpcodecs/dec_teletext.c
==============================================================================
--- trunk/libmpcodecs/dec_teletext.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/dec_teletext.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -1101,8 +1101,7 @@ static int decode_pkt0(priv_vbi_t* priv,
         if(d[i]&0x80){
             pll_add(priv,2,4);
 
-            if(priv->mag[magAddr].pt)
-                  free(priv->mag[magAddr].pt);
+            free(priv->mag[magAddr].pt);
             priv->mag[magAddr].pt=NULL;
             priv->mag[magAddr].order=0;
             return 0;
@@ -1754,10 +1753,8 @@ int teletext_control(void* p, int cmd, v
     }
     case TV_VBI_CONTROL_STOP:
     {
-        if(priv->mag)
-            free(priv->mag);
-        if(priv->ptsp)
-            free(priv->ptsp);
+        free(priv->mag);
+        free(priv->ptsp);
         destroy_cache(priv);
         priv->page_changed=1;
         pthread_mutex_destroy(&priv->buffer_mutex);

Modified: trunk/libmpcodecs/mp_image.c
==============================================================================
--- trunk/libmpcodecs/mp_image.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/mp_image.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -191,7 +191,7 @@ void free_mp_image(mp_image_t* mpi){
     if(!mpi) return;
     if(mpi->flags&MP_IMGFLAG_ALLOCATED){
 	/* becouse we allocate the whole image in once */
-	if(mpi->planes[0]) av_free(mpi->planes[0]);
+	av_free(mpi->planes[0]);
 	if (mpi->flags & MP_IMGFLAG_RGB_PALETTE)
 	    av_free(mpi->planes[1]);
     }

Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/vd_ffmpeg.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -480,8 +480,7 @@ static void uninit(sh_video_t *sh){
 
     av_freep(&avctx);
     av_freep(&ctx->pic);
-    if (ctx)
-        free(ctx);
+    free(ctx);
 }
 
 static void draw_slice(struct AVCodecContext *s,

Modified: trunk/libmpcodecs/vd_libmpeg2.c
==============================================================================
--- trunk/libmpcodecs/vd_libmpeg2.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/vd_libmpeg2.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -125,7 +125,7 @@ static void uninit(sh_video_t *sh){
     int i;
     vd_libmpeg2_ctx_t *context = sh->context;
     mpeg2dec_t * mpeg2dec = context->mpeg2dec;
-    if (context->pending_buffer) free(context->pending_buffer);
+    free(context->pending_buffer);
     mpeg2dec->decoder.convert=NULL;
     mpeg2dec->decoder.convert_id=NULL;
     mpeg2_close (mpeg2dec);

Modified: trunk/libmpcodecs/vd_realvid.c
==============================================================================
--- trunk/libmpcodecs/vd_realvid.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/vd_realvid.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -356,8 +356,7 @@ static void uninit(sh_video_t *sh){
 #endif
 	rv_handle=NULL;
 	initialized = 0;
-	if (buffer)
-	    free(buffer);
+	free(buffer);
 	buffer = NULL;
 	bufsz = 0;
 }
@@ -387,7 +386,7 @@ static mp_image_t* decode(sh_video_t *sh
 	if(len<=0 || flags&2) return NULL; // skipped frame || hardframedrop
 
 	if (bufsz < sh->disp_w*sh->disp_h*3/2) {
-	    if (buffer) free(buffer);
+	    free(buffer);
 	    bufsz = sh->disp_w*sh->disp_h*3/2;
 	    buffer=malloc(bufsz);
 	    if (!buffer) return 0;

Modified: trunk/libmpcodecs/vd_xanim.c
==============================================================================
--- trunk/libmpcodecs/vd_xanim.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/vd_xanim.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -771,8 +771,7 @@ static void uninit(sh_video_t *sh)
 	    close_func();
 	}
     dlclose(priv->file_handler);
-    if (priv->decinfo != NULL)
-	free(priv->decinfo);
+    free(priv->decinfo);
     free(priv);
 }
 

Modified: trunk/libmpcodecs/ve_nuv.c
==============================================================================
--- trunk/libmpcodecs/ve_nuv.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/ve_nuv.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -203,12 +203,9 @@ static int put_image(struct vf_instance 
 
 static void uninit(struct vf_instance *vf) {
 
-  if(vf->priv->buffer)
-    free(vf->priv->buffer);
-  if(vf->priv->zbuffer)
-    free(vf->priv->zbuffer);
-  if(vf->priv->zmem)
-    free(vf->priv->zmem);
+  free(vf->priv->buffer);
+  free(vf->priv->zbuffer);
+  free(vf->priv->zmem);
 
 }
 

Modified: trunk/libmpcodecs/ve_xvid4.c
==============================================================================
--- trunk/libmpcodecs/ve_xvid4.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/ve_xvid4.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -461,15 +461,9 @@ uninit(struct vf_instance *vf)
 	}
 
         /* Free allocated memory */
-	if(mod->frame.quant_intra_matrix)
-	    free(mod->frame.quant_intra_matrix);
-
-	if(mod->frame.quant_inter_matrix)
-	    free(mod->frame.quant_inter_matrix);
-
-	if(mod->mux->bih)
-	    free(mod->mux->bih);
-
+	free(mod->frame.quant_intra_matrix);
+	free(mod->frame.quant_inter_matrix);
+	free(mod->mux->bih);
 	free(vf->priv);
 	vf->priv=NULL;
 
@@ -822,7 +816,7 @@ static int dispatch_settings(xvid_mplaye
 		frame->quant_intra_matrix = (unsigned char*)read_matrix(xvidenc_intra_matrix_file);
 		if(frame->quant_intra_matrix != NULL) {
 			mp_msg(MSGT_MENCODER, MSGL_INFO, "xvid: Loaded Intra matrix (switching to mpeg quantization type)\n");
-			if(xvidenc_quant_method) free(xvidenc_quant_method);
+			free(xvidenc_quant_method);
 			xvidenc_quant_method = strdup("mpeg");
 		}
 	}
@@ -830,7 +824,7 @@ static int dispatch_settings(xvid_mplaye
 		frame->quant_inter_matrix = read_matrix(xvidenc_inter_matrix_file);
 		if(frame->quant_inter_matrix) {
 			mp_msg(MSGT_MENCODER, MSGL_INFO, "\nxvid: Loaded Inter matrix (switching to mpeg quantization type)\n");
-			if(xvidenc_quant_method) free(xvidenc_quant_method);
+			free(xvidenc_quant_method);
 			xvidenc_quant_method = strdup("mpeg");
 		}
 	}

Modified: trunk/libmpcodecs/vf_ass.c
==============================================================================
--- trunk/libmpcodecs/vf_ass.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/vf_ass.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -383,12 +383,9 @@ static int control(vf_instance_t *vf, in
 
 static void uninit(struct vf_instance *vf)
 {
-    if (vf->priv->planes[1])
-        free(vf->priv->planes[1]);
-    if (vf->priv->planes[2])
-        free(vf->priv->planes[2]);
-    if (vf->priv->dirty_rows)
-        free(vf->priv->dirty_rows);
+    free(vf->priv->planes[1]);
+    free(vf->priv->planes[2]);
+    free(vf->priv->dirty_rows);
 }
 
 static const unsigned int fmt_list[] = {

Modified: trunk/libmpcodecs/vf_blackframe.c
==============================================================================
--- trunk/libmpcodecs/vf_blackframe.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/vf_blackframe.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -115,7 +115,7 @@ static int control(struct vf_instance *v
 }
 
 static void uninit(struct vf_instance *vf) {
-    if (vf->priv) free(vf->priv);
+    free(vf->priv);
 }
 
 static int vf_open(vf_instance_t *vf, char *args){

Modified: trunk/libmpcodecs/vf_denoise3d.c
==============================================================================
--- trunk/libmpcodecs/vf_denoise3d.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/vf_denoise3d.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -49,7 +49,7 @@ static int config(struct vf_instance *vf
         int width, int height, int d_width, int d_height,
 	unsigned int flags, unsigned int outfmt){
 
-	if(vf->priv->Line) free(vf->priv->Line);
+	free(vf->priv->Line);
         vf->priv->Line = malloc(width);
 	vf->priv->pmpi=NULL;
 //        vf->default_caps &= !VFCAP_ACCEPT_STRIDE;

Modified: trunk/libmpcodecs/vf_eq.c
==============================================================================
--- trunk/libmpcodecs/vf_eq.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/vf_eq.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -215,7 +215,7 @@ static int query_format(struct vf_instan
 
 static void uninit(struct vf_instance *vf)
 {
-	if (vf->priv->buf) free(vf->priv->buf);
+	free(vf->priv->buf);
 	free(vf->priv);
 }
 

Modified: trunk/libmpcodecs/vf_fspp.c
==============================================================================
--- trunk/libmpcodecs/vf_fspp.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/vf_fspp.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -576,13 +576,13 @@ static void uninit(struct vf_instance *v
 {
     if(!vf->priv) return;
 
-    if(vf->priv->temp) av_free(vf->priv->temp);
+    av_free(vf->priv->temp);
     vf->priv->temp= NULL;
-    if(vf->priv->src)  av_free(vf->priv->src);
+    av_free(vf->priv->src);
     vf->priv->src= NULL;
-    //if(vf->priv->avctx) free(vf->priv->avctx);
+    //free(vf->priv->avctx);
     //vf->priv->avctx= NULL;
-    if(vf->priv->non_b_qp) free(vf->priv->non_b_qp);
+    free(vf->priv->non_b_qp);
     vf->priv->non_b_qp= NULL;
 
     av_free(vf->priv);

Modified: trunk/libmpcodecs/vf_geq.c
==============================================================================
--- trunk/libmpcodecs/vf_geq.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/vf_geq.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -128,8 +128,6 @@ static int put_image(struct vf_instance 
 }
 
 static void uninit(struct vf_instance *vf){
-    if(!vf->priv) return;
-
     av_free(vf->priv);
     vf->priv=NULL;
 }

Modified: trunk/libmpcodecs/vf_hqdn3d.c
==============================================================================
--- trunk/libmpcodecs/vf_hqdn3d.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/vf_hqdn3d.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -44,11 +44,17 @@ struct vf_priv_s {
 
 /***************************************************************************/
 
-static void uninit(struct vf_instance *vf){
-	if(vf->priv->Line){free(vf->priv->Line);vf->priv->Line=NULL;}
-	if(vf->priv->Frame[0]){free(vf->priv->Frame[0]);vf->priv->Frame[0]=NULL;}
-	if(vf->priv->Frame[1]){free(vf->priv->Frame[1]);vf->priv->Frame[1]=NULL;}
-	if(vf->priv->Frame[2]){free(vf->priv->Frame[2]);vf->priv->Frame[2]=NULL;}
+static void uninit(struct vf_instance *vf)
+{
+	free(vf->priv->Line);
+	free(vf->priv->Frame[0]);
+	free(vf->priv->Frame[1]);
+	free(vf->priv->Frame[2]);
+
+	vf->priv->Line     = NULL;
+	vf->priv->Frame[0] = NULL;
+	vf->priv->Frame[1] = NULL;
+	vf->priv->Frame[2] = NULL;
 }
 
 static int config(struct vf_instance *vf,

Modified: trunk/libmpcodecs/vf_hue.c
==============================================================================
--- trunk/libmpcodecs/vf_hue.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/vf_hue.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -158,8 +158,8 @@ static int query_format(struct vf_instan
 
 static void uninit(struct vf_instance *vf)
 {
-	if (vf->priv->buf[0]) free(vf->priv->buf[0]);
-	if (vf->priv->buf[1]) free(vf->priv->buf[1]);
+	free(vf->priv->buf[0]);
+	free(vf->priv->buf[1]);
 	free(vf->priv);
 }
 

Modified: trunk/libmpcodecs/vf_lavc.c
==============================================================================
--- trunk/libmpcodecs/vf_lavc.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/vf_lavc.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -69,7 +69,7 @@ static int config(struct vf_instance *vf
 	}
     }
 
-    if(vf->priv->outbuf) free(vf->priv->outbuf);
+    free(vf->priv->outbuf);
 
     vf->priv->outbuf_size=10000+width*height;  // must be enough!
     vf->priv->outbuf = malloc(vf->priv->outbuf_size);

Modified: trunk/libmpcodecs/vf_mcdeint.c
==============================================================================
--- trunk/libmpcodecs/vf_mcdeint.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/vf_mcdeint.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -278,9 +278,9 @@ static void uninit(struct vf_instance *v
 
 #if 0
     for(i=0; i<3; i++){
-        if(vf->priv->temp[i]) free(vf->priv->temp[i]);
+        free(vf->priv->temp[i]);
         vf->priv->temp[i]= NULL;
-        if(vf->priv->src[i]) free(vf->priv->src[i]);
+        free(vf->priv->src[i]);
         vf->priv->src[i]= NULL;
     }
 #endif

Modified: trunk/libmpcodecs/vf_noise.c
==============================================================================
--- trunk/libmpcodecs/vf_noise.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/vf_noise.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -370,10 +370,10 @@ static int put_image(struct vf_instance 
 static void uninit(struct vf_instance *vf){
 	if(!vf->priv) return;
 
-	if(vf->priv->chromaParam.noise) av_free(vf->priv->chromaParam.noise);
+	av_free(vf->priv->chromaParam.noise);
 	vf->priv->chromaParam.noise= NULL;
 
-	if(vf->priv->lumaParam.noise) av_free(vf->priv->lumaParam.noise);
+	av_free(vf->priv->lumaParam.noise);
 	vf->priv->lumaParam.noise= NULL;
 
 	free(vf->priv);

Modified: trunk/libmpcodecs/vf_perspective.c
==============================================================================
--- trunk/libmpcodecs/vf_perspective.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/vf_perspective.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -132,7 +132,7 @@ static int config(struct vf_instance *vf
 static void uninit(struct vf_instance *vf){
 	if(!vf->priv) return;
 
-	if(vf->priv->pv) free(vf->priv->pv);
+	free(vf->priv->pv);
 	vf->priv->pv= NULL;
 
 	free(vf->priv);

Modified: trunk/libmpcodecs/vf_pp7.c
==============================================================================
--- trunk/libmpcodecs/vf_pp7.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/vf_pp7.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -410,7 +410,7 @@ static int put_image(struct vf_instance 
 static void uninit(struct vf_instance *vf){
     if(!vf->priv) return;
 
-    if(vf->priv->src) free(vf->priv->src);
+    free(vf->priv->src);
     vf->priv->src= NULL;
 
     free(vf->priv);

Modified: trunk/libmpcodecs/vf_qp.c
==============================================================================
--- trunk/libmpcodecs/vf_qp.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/vf_qp.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -144,7 +144,7 @@ static int put_image(struct vf_instance 
 static void uninit(struct vf_instance *vf){
 	if(!vf->priv) return;
 
-	if(vf->priv->qp) av_free(vf->priv->qp);
+	av_free(vf->priv->qp);
 	vf->priv->qp= NULL;
 
 	av_free(vf->priv);

Modified: trunk/libmpcodecs/vf_sab.c
==============================================================================
--- trunk/libmpcodecs/vf_sab.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/vf_sab.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -153,10 +153,10 @@ static void freeBuffers(FilterParam *f){
 	if(f->preFilterContext) sws_freeContext(f->preFilterContext);
 	f->preFilterContext=NULL;
 
-	if(f->preFilterBuf) free(f->preFilterBuf);
+	free(f->preFilterBuf);
 	f->preFilterBuf=NULL;
 
-	if(f->distCoeff) free(f->distCoeff);
+	free(f->distCoeff);
 	f->distCoeff=NULL;
 }
 

Modified: trunk/libmpcodecs/vf_scale.c
==============================================================================
--- trunk/libmpcodecs/vf_scale.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/vf_scale.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -302,10 +302,8 @@ static int config(struct vf_instance *vf
     }
     vf->priv->fmt=best;
 
-    if(vf->priv->palette){
-	free(vf->priv->palette);
-	vf->priv->palette=NULL;
-    }
+    free(vf->priv->palette);
+    vf->priv->palette=NULL;
     switch(best){
     case IMGFMT_RGB8: {
       /* set 332 palette for 8 bpp */
@@ -524,7 +522,7 @@ static int query_format(struct vf_instan
 static void uninit(struct vf_instance *vf){
     if(vf->priv->ctx) sws_freeContext(vf->priv->ctx);
     if(vf->priv->ctx2) sws_freeContext(vf->priv->ctx2);
-    if(vf->priv->palette) free(vf->priv->palette);
+    free(vf->priv->palette);
     free(vf->priv);
 }
 

Modified: trunk/libmpcodecs/vf_screenshot.c
==============================================================================
--- trunk/libmpcodecs/vf_screenshot.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/vf_screenshot.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -75,7 +75,7 @@ static int config(struct vf_instance *vf
     vf->priv->dh = d_height;
     vf->priv->stride = (3*vf->priv->dw+15)&~15;
 
-    if (vf->priv->buffer) free(vf->priv->buffer); // probably reconfigured
+    free(vf->priv->buffer); // probably reconfigured
     vf->priv->buffer = NULL;
 
     return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);
@@ -278,7 +278,7 @@ static void uninit(vf_instance_t *vf)
     avcodec_close(vf->priv->avctx);
     av_freep(&vf->priv->avctx);
     if(vf->priv->ctx) sws_freeContext(vf->priv->ctx);
-    if (vf->priv->buffer) av_free(vf->priv->buffer);
+    av_free(vf->priv->buffer);
     free(vf->priv->outbuffer);
     free(vf->priv);
 }

Modified: trunk/libmpcodecs/vf_spp.c
==============================================================================
--- trunk/libmpcodecs/vf_spp.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/vf_spp.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -520,13 +520,13 @@ static int put_image(struct vf_instance 
 static void uninit(struct vf_instance *vf){
 	if(!vf->priv) return;
 
-	if(vf->priv->temp) free(vf->priv->temp);
+	free(vf->priv->temp);
 	vf->priv->temp= NULL;
-	if(vf->priv->src) free(vf->priv->src);
+	free(vf->priv->src);
 	vf->priv->src= NULL;
-        if(vf->priv->avctx) free(vf->priv->avctx);
+        free(vf->priv->avctx);
         vf->priv->avctx= NULL;
-        if(vf->priv->non_b_qp) free(vf->priv->non_b_qp);
+        free(vf->priv->non_b_qp);
         vf->priv->non_b_qp= NULL;
 
 	free(vf->priv);

Modified: trunk/libmpcodecs/vf_unsharp.c
==============================================================================
--- trunk/libmpcodecs/vf_unsharp.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/vf_unsharp.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -212,12 +212,12 @@ static void uninit( struct vf_instance *
 
     fp = &vf->priv->lumaParam;
     for( z=0; z<sizeof(fp->SC)/sizeof(fp->SC[0]); z++ ) {
-	if( fp->SC[z] ) av_free( fp->SC[z] );
+	av_free( fp->SC[z] );
 	fp->SC[z] = NULL;
     }
     fp = &vf->priv->chromaParam;
     for( z=0; z<sizeof(fp->SC)/sizeof(fp->SC[0]); z++ ) {
-	if( fp->SC[z] ) av_free( fp->SC[z] );
+	av_free( fp->SC[z] );
 	fp->SC[z] = NULL;
     }
 

Modified: trunk/libmpcodecs/vf_uspp.c
==============================================================================
--- trunk/libmpcodecs/vf_uspp.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpcodecs/vf_uspp.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -303,9 +303,9 @@ static void uninit(struct vf_instance *v
     if(!vf->priv) return;
 
     for(i=0; i<3; i++){
-        if(vf->priv->temp[i]) free(vf->priv->temp[i]);
+        free(vf->priv->temp[i]);
         vf->priv->temp[i]= NULL;
-        if(vf->priv->src[i]) free(vf->priv->src[i]);
+        free(vf->priv->src[i]);
         vf->priv->src[i]= NULL;
     }
     for(i=0; i<BLOCK*BLOCK; i++){

Modified: trunk/libmpdemux/asfheader.c
==============================================================================
--- trunk/libmpdemux/asfheader.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpdemux/asfheader.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -710,7 +710,7 @@ return 1;
 len_err_out:
   mp_msg(MSGT_HEADER, MSGL_FATAL, MSGTR_MPDEMUX_ASFHDR_InvalidLengthInASFHeader);
 err_out:
-  if (hdr) free(hdr);
-  if (streams) free(streams);
+  free(hdr);
+  free(streams);
   return 0;
 }

Modified: trunk/libmpdemux/demux_aac.c
==============================================================================
--- trunk/libmpdemux/demux_aac.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpdemux/demux_aac.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -65,8 +65,7 @@ static void demux_close_aac(demuxer_t *d
 	if(!priv)
 		return;
 
-	if(priv->buf)
-		free(priv->buf);
+	free(priv->buf);
 
 	free(demuxer->priv);
 

Modified: trunk/libmpdemux/demux_asf.c
==============================================================================
--- trunk/libmpdemux/demux_asf.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpdemux/demux_asf.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -672,12 +672,8 @@ static void demux_close_asf(demuxer_t *d
 
     if (!asf) return;
 
-    if (asf->aud_repdata_sizes)
-      free(asf->aud_repdata_sizes);
-
-    if (asf->vid_repdata_sizes)
-      free(asf->vid_repdata_sizes);
-
+    free(asf->aud_repdata_sizes);
+    free(asf->vid_repdata_sizes);
     free(asf);
 }
 

Modified: trunk/libmpdemux/demux_audio.c
==============================================================================
--- trunk/libmpdemux/demux_audio.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpdemux/demux_audio.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -671,8 +671,6 @@ static void demux_audio_seek(demuxer_t *
 static void demux_close_audio(demuxer_t* demuxer) {
   da_priv_t* priv = demuxer->priv;
 
-  if(!priv)
-    return;
   free(priv);
 }
 

Modified: trunk/libmpdemux/demux_film.c
==============================================================================
--- trunk/libmpdemux/demux_film.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpdemux/demux_film.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -458,8 +458,7 @@ static void demux_close_film(demuxer_t* 
 
   if(!film_data)
     return;
-  if(film_data->chunks)
-    free(film_data->chunks);
+  free(film_data->chunks);
   free(film_data);
 
 }

Modified: trunk/libmpdemux/demux_fli.c
==============================================================================
--- trunk/libmpdemux/demux_fli.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpdemux/demux_fli.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -191,11 +191,8 @@ static void demux_close_fli(demuxer_t* d
   if(!frames)
     return;
 
-  if(frames->filepos)
-    free(frames->filepos);
-  if(frames->frame_size)
-    free(frames->frame_size);
-
+  free(frames->filepos);
+  free(frames->frame_size);
   free(frames);
 
 }

Modified: trunk/libmpdemux/demux_mf.c
==============================================================================
--- trunk/libmpdemux/demux_mf.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpdemux/demux_mf.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -180,8 +180,6 @@ static demuxer_t* demux_open_mf(demuxer_
 static void demux_close_mf(demuxer_t* demuxer) {
   mf_t *mf = demuxer->priv;
 
-  if(!mf)
-    return;
   free(mf);
 }
 

Modified: trunk/libmpdemux/demux_mng.c
==============================================================================
--- trunk/libmpdemux/demux_mng.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpdemux/demux_mng.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -476,8 +476,7 @@ static void demux_mng_close(demuxer_t* d
             mng_cleanup(&mng_priv->h_mng);
 
         // free private data
-        if (mng_priv->canvas)
-            free(mng_priv->canvas);
+        free(mng_priv->canvas);
 
         free(mng_priv);
     }

Modified: trunk/libmpdemux/demux_mpc.c
==============================================================================
--- trunk/libmpdemux/demux_mpc.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpdemux/demux_mpc.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -199,8 +199,6 @@ static void demux_mpc_seek(demuxer_t *de
 static void demux_close_mpc(demuxer_t* demuxer) {
   da_priv_t* priv = demuxer->priv;
 
-  if(!priv)
-    return;
   free(priv);
 }
 

Modified: trunk/libmpdemux/demux_mpg.c
==============================================================================
--- trunk/libmpdemux/demux_mpg.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpdemux/demux_mpg.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -248,7 +248,7 @@ static demuxer_t* demux_mpg_open(demuxer
 
 static void demux_close_mpg(demuxer_t* demuxer) {
   mpg_demuxer_t* mpg_d = demuxer->priv;
-  if (mpg_d) free(mpg_d);
+  free(mpg_d);
 }
 
 

Modified: trunk/libmpdemux/demux_nsv.c
==============================================================================
--- trunk/libmpdemux/demux_nsv.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpdemux/demux_nsv.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -323,8 +323,6 @@ static int nsv_check_file ( demuxer_t* d
 static void demux_close_nsv(demuxer_t* demuxer) {
     nsv_priv_t* priv = demuxer->priv;
 
-    if(!priv)
-        return;
     free(priv);
 
 }

Modified: trunk/libmpdemux/demux_ogg.c
==============================================================================
--- trunk/libmpdemux/demux_ogg.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpdemux/demux_ogg.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -437,11 +437,10 @@ static void demux_ogg_check_comments(dem
                 sh_sub_t *sh;
 
                 // in case of malicious files with more than one lang per track:
-                if (ogg_d->text_langs[index])
-                    free(ogg_d->text_langs[index]);
+                free(ogg_d->text_langs[index]);
                 ogg_d->text_langs[index] = strdup(val);
                 sh = d->s_streams[index];
-                if (sh && sh->lang)
+                if (sh)
                     free(sh->lang);
                 if (sh)
                     sh->lang = strdup(val);
@@ -1605,13 +1604,11 @@ static void demux_close_ogg(demuxer_t *d
         }
         free(ogg_d->subs);
     }
-    if (ogg_d->syncpoints)
-        free(ogg_d->syncpoints);
-    if (ogg_d->text_ids)
-        free(ogg_d->text_ids);
+    free(ogg_d->syncpoints);
+    free(ogg_d->text_ids);
     if (ogg_d->text_langs) {
         for (i = 0; i < ogg_d->n_text; i++)
-            if (ogg_d->text_langs[i]) free(ogg_d->text_langs[i]);
+            free(ogg_d->text_langs[i]);
         free(ogg_d->text_langs);
     }
     free(ogg_d);

Modified: trunk/libmpdemux/demux_pva.c
==============================================================================
--- trunk/libmpdemux/demux_pva.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpdemux/demux_pva.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -516,11 +516,8 @@ static void demux_seek_pva(demuxer_t * d
 
 static void demux_close_pva(demuxer_t * demuxer)
 {
-	if(demuxer->priv)
-	{
-		free(demuxer->priv);
-		demuxer->priv=NULL;
-	}
+	free(demuxer->priv);
+	demuxer->priv = NULL;
 }
 
 

Modified: trunk/libmpdemux/demux_real.c
==============================================================================
--- trunk/libmpdemux/demux_real.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpdemux/demux_real.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -1626,8 +1626,7 @@ skip_this_chunk:
 #else
 		stream_skip(demuxer->stream, codec_data_size - tmp);
 #endif
-		if (mimet)
-		    free (mimet);
+		free (mimet);
 		break;
 //	    }
 	    }
@@ -1764,12 +1763,9 @@ static void demux_close_real(demuxer_t *
 
     if (priv){
     	for(i=0; i<MAX_STREAMS; i++)
-	    if(priv->index_table[i])
-	        free(priv->index_table[i]);
-    if (priv->audio_buf)
-        free(priv->audio_buf);
-    if (priv->audio_timestamp)
-        free(priv->audio_timestamp);
+	    free(priv->index_table[i]);
+	free(priv->audio_buf);
+	free(priv->audio_timestamp);
 	free(priv);
     }
 

Modified: trunk/libmpdemux/demux_realaud.c
==============================================================================
--- trunk/libmpdemux/demux_realaud.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpdemux/demux_realaud.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -334,14 +334,12 @@ static demuxer_t* demux_open_ra(demuxer_
 
 static void demux_close_ra(demuxer_t *demuxer)
 {
-	ra_priv_t* ra_priv = demuxer->priv;
+    ra_priv_t* ra_priv = demuxer->priv;
 
     if (ra_priv) {
-	    if (ra_priv->audio_buf)
-	        free (ra_priv->audio_buf);
-		free(ra_priv);
+        free(ra_priv->audio_buf);
+        free(ra_priv);
     }
-	return;
 }
 
 

Modified: trunk/libmpdemux/demux_roq.c
==============================================================================
--- trunk/libmpdemux/demux_roq.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpdemux/demux_roq.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -260,8 +260,6 @@ static demuxer_t* demux_open_roq(demuxer
 static void demux_close_roq(demuxer_t* demuxer) {
   roq_data_t *roq_data = demuxer->priv;
 
-  if(!roq_data)
-    return;
   free(roq_data);
 }
 

Modified: trunk/libmpdemux/demux_rtp_codec.cpp
==============================================================================
--- trunk/libmpdemux/demux_rtp_codec.cpp	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpdemux/demux_rtp_codec.cpp	Sun Nov 14 10:12:34 2010	(r32624)
@@ -70,7 +70,7 @@ static unsigned char* parseH264ConfigStr
 
     psz += strlen(psz)+1;
     }
-    if( dup ) free( dup );
+    free( dup );
 
     return cfg;
 }

Modified: trunk/libmpdemux/demux_ts.c
==============================================================================
--- trunk/libmpdemux/demux_ts.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpdemux/demux_ts.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -1100,19 +1100,15 @@ static void demux_close_ts(demuxer_t * d
 
 	if(priv)
 	{
-		if(priv->pat.section.buffer)
-			free(priv->pat.section.buffer);
-		if(priv->pat.progs)
-			free(priv->pat.progs);
+		free(priv->pat.section.buffer);
+		free(priv->pat.progs);
 
 		if(priv->pmt)
 		{
 			for(i = 0; i < priv->pmt_cnt; i++)
 			{
-				if(priv->pmt[i].section.buffer)
-					free(priv->pmt[i].section.buffer);
-				if(priv->pmt[i].es)
-					free(priv->pmt[i].es);
+				free(priv->pmt[i].section.buffer);
+				free(priv->pmt[i].es);
 			}
 			free(priv->pmt);
 		}

Modified: trunk/libmpdemux/demux_viv.c
==============================================================================
--- trunk/libmpdemux/demux_viv.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpdemux/demux_viv.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -232,12 +232,9 @@ static void vivo_parse_text_header(demux
 	token = strtok(NULL, (char *)&("\x0d\x0a"));
     }
 
-    if (buf)
-	free(buf);
-    if (opt)
-	free(opt);
-    if (param)
-	free(param);
+    free(buf);
+    free(opt);
+    free(param);
 }
 
 static int vivo_check_file(demuxer_t* demuxer){
@@ -745,14 +742,10 @@ static void demux_close_vivo(demuxer_t *
     vivo_priv_t* priv=demuxer->priv;
 
     if (priv) {
-	if (priv->title)
-	    free(priv->title);
-        if (priv->author)
-	    free(priv->author);
-	if (priv->copyright)
-	    free(priv->copyright);
-	if (priv->producer)
-	   free(priv->producer);
+	free(priv->title);
+	free(priv->author);
+	free(priv->copyright);
+	free(priv->producer);
 	free(priv);
     }
     return;

Modified: trunk/libmpdemux/demuxer.h
==============================================================================
--- trunk/libmpdemux/demuxer.h	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpdemux/demuxer.h	Sun Nov 14 10:12:34 2010	(r32624)
@@ -307,7 +307,7 @@ static inline void resize_demux_packet(d
   }
   else
   {
-     if(dp->buffer) free(dp->buffer);
+     free(dp->buffer);
      dp->buffer=NULL;
   }
   dp->len=len;
@@ -332,7 +332,7 @@ static inline void free_demux_packet(dem
   if (dp->master==NULL){  //dp is a master packet
     dp->refcount--;
     if (dp->refcount==0){
-      if (dp->buffer) free(dp->buffer);
+      free(dp->buffer);
       free(dp);
     }
     return;

Modified: trunk/libmpdemux/muxer_mpeg.c
==============================================================================
--- trunk/libmpdemux/muxer_mpeg.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libmpdemux/muxer_mpeg.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -496,14 +496,11 @@ init_fail:
     if(s->priv)
     {
       spriv = s->priv;
-      if(spriv->pack)
-        free(spriv->pack);
-      if(spriv->buffer_track)
-        free(spriv->buffer_track);
+      free(spriv->pack);
+      free(spriv->buffer_track);
       free(s->priv);
     }
-    if(s->b_buffer)
-      free(s->b_buffer);
+    free(s->b_buffer);
     free(s);
   }
   return NULL;

Modified: trunk/libvo/gl_common.c
==============================================================================
--- trunk/libvo/gl_common.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libvo/gl_common.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -1143,8 +1143,7 @@ static void create_conv_textures(gl_conv
     default:
       mp_msg(MSGT_VO, MSGL_ERR, "[gl] unknown conversion type %i\n", conv);
   }
-  if (lookup_data)
-    free(lookup_data);
+  free(lookup_data);
 }
 
 /**

Modified: trunk/libvo/video_out.c
==============================================================================
--- trunk/libvo/video_out.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libvo/video_out.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -546,8 +546,7 @@ range_t *str2range(char *s)
 	r[i].min = r[i].max = -1;
 	return r;
 out_err:
-	if (r)
-		free(r);
+	free(r);
 	return NULL;
 }
 

Modified: trunk/libvo/vo_aa.c
==============================================================================
--- trunk/libvo/vo_aa.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libvo/vo_aa.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -648,17 +648,16 @@ static int parse_suboptions(const char *
         if (subcolor) aaopt_subcolor = getcolor(subcolor);
     }
 
-    if (subopts) free(subopts);
-    if (booleans) free(booleans);
+    free(subopts);
+    free(booleans);
     if (strings) {
         for (i=0; i<nstrings; i++)
-            if (strings[i])
-                free(strings[i]);
+            free(strings[i]);
         free(strings);
     }
-    if (osdcolor) free(osdcolor);
-    if (subcolor) free(subcolor);
-    if (helpmsg) free(helpmsg);
+    free(osdcolor);
+    free(subcolor);
+    free(helpmsg);
     return retval;
 }
 

Modified: trunk/libvo/vo_corevideo.m
==============================================================================
--- trunk/libvo/vo_corevideo.m	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libvo/vo_corevideo.m	Sun Nov 14 10:12:34 2010	(r32624)
@@ -345,7 +345,7 @@ static void uninit(void)
         [finalPool release];
     }
 
-    if (buffer_name) free(buffer_name);
+    free(buffer_name);
     buffer_name = NULL;
 }
 

Modified: trunk/libvo/vo_cvidix.c
==============================================================================
--- trunk/libvo/vo_cvidix.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libvo/vo_cvidix.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -150,10 +150,8 @@ static int query_format(uint32_t format)
 static void uninit(void){
   if(!vo_config_count) return;
   vidix_term();
-  if(vidix_name){
-    free(vidix_name);
-	vidix_name = NULL;
-  }
+  free(vidix_name);
+  vidix_name = NULL;
 }
 
 static int preinit(const char *arg){

Modified: trunk/libvo/vo_directx.c
==============================================================================
--- trunk/libvo/vo_directx.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libvo/vo_directx.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -1182,8 +1182,7 @@ static void flip_page(void)
 	        mp_msg(MSGT_VO,MSGL_WARN,"<vo_directx><WARN>stride changed !!!! disabling direct rendering\n");
 	        vo_directrendering=0;
 	    }
-	    if (tmp_image)
-		    free(tmp_image);
+	    free(tmp_image);
 	    tmp_image = NULL;
 	    dstride = ddsdsf.lPitch;
 	    image = ddsdsf.lpSurface;

Modified: trunk/libvo/vo_dxr2.c
==============================================================================
--- trunk/libvo/vo_dxr2.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libvo/vo_dxr2.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -789,10 +789,8 @@ static void uninit(void)
     close(dxr2_fd);
     dxr2_fd = -1;
   }
-  if(sub_img) {
-    free(sub_img);
-    sub_img = NULL;
-  }
+  free(sub_img);
+  sub_img = NULL;
   if(sub_vo) {
     int cc = vo_config_count;
     vo_config_count = sub_config_count;

Modified: trunk/libvo/vo_dxr3.c
==============================================================================
--- trunk/libvo/vo_dxr3.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libvo/vo_dxr3.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -715,12 +715,8 @@ static void uninit(void)
 		close(fd_control);
 	}
 #ifdef SPU_SUPPORT
-	if(osdpicbuf) {
-		free(osdpicbuf);
-	}
-	if(spued) {
-		free(spued);
-	}
+	free(osdpicbuf);
+	free(spued);
 #endif
 }
 
@@ -935,9 +931,7 @@ static overlay_t *overlay_init(int dev)
 
 static int overlay_release(overlay_t *o)
 {
-    if(o)
-	free(o);
-
+    free(o);
     return 0;
 }
 #define TYPE_INT 1

Modified: trunk/libvo/vo_fbdev.c
==============================================================================
--- trunk/libvo/vo_fbdev.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libvo/vo_fbdev.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -365,10 +365,8 @@ err_out_parse_error:
 err_out_print_linenum:
     mp_msg(MSGT_VO, MSGL_V, " at line %d\n", line_num);
 err_out:
-    if (fb_modes) {
-        free(fb_modes);
-        fb_modes = NULL;
-    }
+    free(fb_modes);
+    fb_modes = NULL;
     nr_modes = 0;
     free(line);
     free(fp);
@@ -1119,8 +1117,7 @@ static int preinit(const char *vo_subdev
         else
 #endif
         {
-            if (fb_dev_name)
-                free(fb_dev_name);
+            free(fb_dev_name);
             fb_dev_name = strdup(vo_subdevice);
         }
     }

Modified: trunk/libvo/vo_fbdev2.c
==============================================================================
--- trunk/libvo/vo_fbdev2.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libvo/vo_fbdev2.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -220,7 +220,7 @@ static int preinit(const char *subdevice
 {
 	if (subdevice)
 	{
-	    if (fb_dev_name) free(fb_dev_name);
+	    free(fb_dev_name);
 	    fb_dev_name = strdup(subdevice);
 	}
 	return fb_preinit(0);
@@ -413,7 +413,7 @@ static void uninit(void)
 			mp_msg(MSGT_VO, MSGL_ERR, "[fbdev2] Can't restore original cmap\n");
 		fb_cmap_changed = 0;
 	}
-	if(next_frame) free(next_frame);
+	free(next_frame);
 	if (fb_dev_fd >= 0) {
 		if (ioctl(fb_dev_fd, FBIOPUT_VSCREENINFO, &fb_orig_vinfo))
 			mp_msg(MSGT_VO, MSGL_ERR, "[fbdev2] Can't reset original fb_var_screeninfo: %s\n", strerror(errno));

Modified: trunk/libvo/vo_ggi.c
==============================================================================
--- trunk/libvo/vo_ggi.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libvo/vo_ggi.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -453,8 +453,7 @@ static int preinit(const char *arg)
 
 static void uninit(void)
 {
-    if (ggi_conf.driver)
-        free(ggi_conf.driver);
+    free(ggi_conf.driver);
 
 #ifdef CONFIG_GGIWMH
     ggiWmhDetach(ggi_conf.vis);

Modified: trunk/libvo/vo_gif89a.c
==============================================================================
--- trunk/libvo/vo_gif89a.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libvo/vo_gif89a.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -362,9 +362,9 @@ static void uninit(void)
 	}
 
 	// free our allocated ram
-	if (gif_filename != NULL) free(gif_filename);
-	if (slice_data != NULL) free(slice_data);
-	if (reduce_data != NULL) free(reduce_data);
+	free(gif_filename);
+	free(slice_data);
+	free(reduce_data);
 	if (reduce_cmap != NULL) FreeMapObject(reduce_cmap);
 
 	// set the pointers back to null.

Modified: trunk/libvo/vo_gl.c
==============================================================================
--- trunk/libvo/vo_gl.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libvo/vo_gl.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -1097,9 +1097,9 @@ static void
 uninit(void)
 {
   uninitGl();
-  if (custom_prog) free(custom_prog);
+  free(custom_prog);
   custom_prog = NULL;
-  if (custom_tex) free(custom_tex);
+  free(custom_tex);
   custom_tex = NULL;
   uninit_mpglcontext(&glctx);
 }

Modified: trunk/libvo/vo_gl2.c
==============================================================================
--- trunk/libvo/vo_gl2.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libvo/vo_gl2.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -236,8 +236,7 @@ static int initTextures(void)
   texpercx = (GLfloat) texture_width / (GLfloat) image_width;
   texpercy = (GLfloat) texture_height / (GLfloat) image_height;
 
-  if (texgrid)
-    free(texgrid);
+  free(texgrid);
   texgrid = calloc (texnumx * texnumy, sizeof (struct TexSquare));
 
   raw_line_len = image_width * image_bytes;
@@ -828,10 +827,8 @@ static void
 uninit(void)
 {
   if ( !vo_config_count ) return;
-  if (texgrid) {
-    free(texgrid);
-    texgrid = NULL;
-  }
+  free(texgrid);
+  texgrid = NULL;
   uninit_mpglcontext(&glctx);
 }
 

Modified: trunk/libvo/vo_jpeg.c
==============================================================================
--- trunk/libvo/vo_jpeg.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libvo/vo_jpeg.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -309,14 +309,10 @@ static int query_format(uint32_t format)
 
 static void uninit(void)
 {
-    if (jpeg_subdirs) {
-        free(jpeg_subdirs);
-        jpeg_subdirs = NULL;
-    }
-    if (jpeg_outdir) {
-        free(jpeg_outdir);
-        jpeg_outdir = NULL;
-    }
+    free(jpeg_subdirs);
+    jpeg_subdirs = NULL;
+    free(jpeg_outdir);
+    jpeg_outdir = NULL;
 }
 
 /* ------------------------------------------------------------------------- */

Modified: trunk/libvo/vo_md5sum.c
==============================================================================
--- trunk/libvo/vo_md5sum.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libvo/vo_md5sum.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -281,10 +281,8 @@ static int control(uint32_t request, voi
 
 static void uninit(void)
 {
-    if (md5sum_outfile) {
-        free(md5sum_outfile);
-        md5sum_outfile = NULL;
-    }
+    free(md5sum_outfile);
+    md5sum_outfile = NULL;
     if (md5sum_fd) fclose(md5sum_fd);
 }
 

Modified: trunk/libvo/vo_png.c
==============================================================================
--- trunk/libvo/vo_png.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libvo/vo_png.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -199,10 +199,8 @@ static void uninit(void){
     av_freep(&avctx);
     av_freep(&outbuffer);
     outbuffer_size = 0;
-    if (png_outdir) {
-        free(png_outdir);
-        png_outdir = NULL;
-    }
+    free(png_outdir);
+    png_outdir = NULL;
 }
 
 static void check_events(void){}

Modified: trunk/libvo/vo_pnm.c
==============================================================================
--- trunk/libvo/vo_pnm.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libvo/vo_pnm.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -557,14 +557,10 @@ static int control(uint32_t request, voi
 
 static void uninit(void)
 {
-    if (pnm_subdirs) {
-        free(pnm_subdirs);
-        pnm_subdirs = NULL;
-    }
-    if (pnm_outdir) {
-        free(pnm_outdir);
-        pnm_outdir = NULL;
-    }
+    free(pnm_subdirs);
+    pnm_subdirs = NULL;
+    free(pnm_outdir);
+    pnm_outdir = NULL;
 }
 
 /* ------------------------------------------------------------------------- */

Modified: trunk/libvo/vo_winvidix.c
==============================================================================
--- trunk/libvo/vo_winvidix.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libvo/vo_winvidix.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -311,11 +311,8 @@ static void uninit(void){
     if ( !vo_config_count ) return;
     vidix_term();
 
-    if (vidix_name){
-	free(vidix_name);
-	vidix_name = NULL;
-    }
-    //
+    free(vidix_name);
+    vidix_name = NULL;
 }
 
 static int preinit(const char *arg){

Modified: trunk/libvo/vo_xvidix.c
==============================================================================
--- trunk/libvo/vo_xvidix.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libvo/vo_xvidix.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -362,11 +362,8 @@ static void uninit(void)
         return;
     vidix_term();
 
-    if (vidix_name)
-    {
-        free(vidix_name);
-        vidix_name = NULL;
-    }
+    free(vidix_name);
+    vidix_name = NULL;
 
     vo_x11_uninit();
 }

Modified: trunk/libvo/vo_yuv4mpeg.c
==============================================================================
--- trunk/libvo/vo_yuv4mpeg.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libvo/vo_yuv4mpeg.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -235,16 +235,14 @@ static int query_format(uint32_t format)
 // WARNING: config(...) also uses this
 static void uninit(void)
 {
-    if(image)
-		free(image);
+	free(image);
 	image = NULL;
 
 	if(yuv_out)
 		fclose(yuv_out);
 	yuv_out = NULL;
 
-	if (yuv_filename)
-		free(yuv_filename);
+	free(yuv_filename);
 	yuv_filename = NULL;
 	image_width = 0;
 	image_height = 0;

Modified: trunk/libvo/vo_zr.c
==============================================================================
--- trunk/libvo/vo_zr.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/libvo/vo_zr.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -268,10 +268,8 @@ static int init_zoran(zr_info_t *zr, int
 
 static void uninit_zoran(zr_info_t *zr)
 {
-	if (zr->image) {
-		free(zr->image);
-		zr->image=NULL;
-	}
+	free(zr->image);
+	zr->image=NULL;
 	while (zr->queue > zr->synco + 1) {
 		if (ioctl(zr->vdes, MJPIOC_SYNC, &zr->zs) < 0)
 			mp_msg(MSGT_VO, MSGL_ERR, "zr: error waiting for buffers to become free\n");
@@ -800,8 +798,7 @@ void vo_zr_revertoption(const m_option_t
   zr_parsing = 0;
 
   if (!strcasecmp(param, "zrdev")) {
-    if(zr->device)
-      free(zr->device);
+    free(zr->device);
     zr->device=NULL;
   } else if (!strcasecmp(param, "zrbw"))
     zr->bw=0;

Modified: trunk/loader/afl.c
==============================================================================
--- trunk/loader/afl.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/loader/afl.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -310,8 +310,7 @@ PWINE_ACMDRIVERID MSACM_UnregisterDriver
     while (p->pACMDriverList)
 	acmDriverClose((HACMDRIVER) p->pACMDriverList, 0);
 
-    if (p->pszFileName)
-	free(p->pszFileName);
+    free(p->pszFileName);
 
     if (p == MSACM_pFirstACMDriverID)
 	MSACM_pFirstACMDriverID = p->pNextACMDriverID;

Modified: trunk/loader/dshow/cmediasample.c
==============================================================================
--- trunk/loader/dshow/cmediasample.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/loader/dshow/cmediasample.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -351,7 +351,7 @@ static HRESULT STDCALL CMediaSample_GetM
     }
 
     t = &((CMediaSample*)This)->media_type;
-    //    if(t.pbFormat)free(t.pbFormat);
+    //    free(t.pbFormat);
     *ppMediaType=CreateMediaType(t);
     //    *ppMediaType=0; //media type was not changed
     return 0;

Modified: trunk/loader/dshow/inputpin.c
==============================================================================
--- trunk/loader/dshow/inputpin.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/loader/dshow/inputpin.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -857,8 +857,7 @@ static IPin* CBaseFilter_GetUnusedPin(CB
  */
 static void CBaseFilter_Destroy(CBaseFilter* This)
 {
-    if (This->vt)
-	free(This->vt);
+    free(This->vt);
     if (This->pin)
 	This->pin->vt->Release((IUnknown*)This->pin);
     if (This->unused_pin)
@@ -1190,8 +1189,7 @@ static void CBaseFilter2_Destroy(CBaseFi
     Debug printf("CBaseFilter2_Destroy(%p) called\n", This);
     if (This->pin)
 	This->pin->vt->Release((IUnknown*) This->pin);
-    if (This->vt)
-	free(This->vt);
+    free(This->vt);
     free(This);
 }
 

Modified: trunk/loader/dshow/outputpin.c
==============================================================================
--- trunk/loader/dshow/outputpin.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/loader/dshow/outputpin.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -792,12 +792,9 @@ static void COutputPin_SetNewFormat(COut
  */
 static void COutputPin_Destroy(COutputPin* This)
 {
-    if (This->mempin->vt)
-	free(This->mempin->vt);
-    if (This->mempin)
-	free(This->mempin);
-    if (This->vt)
-	free(This->vt);
+    free(This->mempin->vt);
+    free(This->mempin);
+    free(This->vt);
     FreeMediaType(&(This->type));
     free(This);
 }

Modified: trunk/loader/ext.c
==============================================================================
--- trunk/loader/ext.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/loader/ext.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -93,7 +93,7 @@ LPVOID WINAPI HeapAlloc(HANDLE heap, DWO
 
 WIN_BOOL WINAPI HeapFree(HANDLE heap, DWORD flags, LPVOID mem)
 {
-    if (mem) free(mem);
+    free(mem);
     //printf("HeapFree  %p\n", mem);
     //if (!mem)
     //    abort();
@@ -409,8 +409,7 @@ WIN_BOOL WINAPI UnmapViewOfFile(LPVOID h
 	    result=munmap((void*)handle, p->mapping_size);
 	    if(p->next)p->next->prev=p->prev;
 	    if(p->prev)p->prev->next=p->next;
-	    if(p->name)
-		free(p->name);
+	    free(p->name);
 	    if(p==fm)
 		fm=p->prev;
 	    free(p);

Modified: trunk/loader/ldt_keeper.c
==============================================================================
--- trunk/loader/ldt_keeper.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/loader/ldt_keeper.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -272,8 +272,7 @@ void Restore_LDT_Keeper(ldt_fs_t* ldt_fs
 {
     if (ldt_fs == NULL || ldt_fs->fs_seg == 0)
 	return;
-    if (ldt_fs->prev_struct)
-	free(ldt_fs->prev_struct);
+    free(ldt_fs->prev_struct);
     munmap((char*)ldt_fs->fs_seg, getpagesize());
     ldt_fs->fs_seg = 0;
     free(ldt_fs);

Modified: trunk/loader/pe_image.c
==============================================================================
--- trunk/loader/pe_image.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/loader/pe_image.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -868,10 +868,8 @@ void PE_UnloadLibrary(WINE_MODREF *wm)
 {
     TRACE(" unloading %s\n", wm->filename);
 
-    if (wm->filename)
-	free(wm->filename);
-    if (wm->short_filename)
-	free(wm->short_filename);
+    free(wm->filename);
+    free(wm->short_filename);
     HeapFree( GetProcessHeap(), 0, wm->deps );
     VirtualFree( (LPVOID)wm->module, 0, MEM_RELEASE );
     HeapFree( GetProcessHeap(), 0, wm );

Modified: trunk/loader/registry.c
==============================================================================
--- trunk/loader/registry.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/loader/registry.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -158,8 +158,7 @@ void free_registry(void)
     while (t)
     {
 	reg_handle_t* f = t;
-        if (t->name)
-	    free(t->name);
+	free(t->name);
 	t=t->prev;
         free(f);
     }
@@ -380,8 +379,7 @@ long __stdcall RegCloseKey(long key)
 	handle->prev->next=handle->next;
     if(handle->next)
 	handle->next->prev=handle->prev;
-    if(handle->name)
-	free(handle->name);
+    free(handle->name);
     if(handle==head)
 	head=head->prev;
     free(handle);

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/mplayer.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -1152,8 +1152,7 @@ void update_set_of_subtitles(void)
 }
 
 void init_vo_spudec(void) {
-  if (vo_spudec)
-    spudec_free(vo_spudec);
+  spudec_free(vo_spudec);
   vo_spudec = NULL;
 
   // we currently can't work without video stream

Modified: trunk/osdep/macosx_finder_args.c
==============================================================================
--- trunk/osdep/macosx_finder_args.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/osdep/macosx_finder_args.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -91,8 +91,7 @@ long itemsInList;
 				}
 			}
 
-			if(parm)
-				free(parm);
+			free(parm);
 
 			err=noErr;
 		}

Modified: trunk/stream/freesdp/parser.c
==============================================================================
--- trunk/stream/freesdp/parser.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/stream/freesdp/parser.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -471,8 +471,7 @@ fsdp_parse (const char *text_description
       }
       else if (!strncmp (fsdp_buf[0], "range", 5))
       {
-        if (dsc->a_range)
-          free (dsc->a_range);
+        free (dsc->a_range);
         dsc->a_range = strdup (fsdp_buf[1]);
       }
       else
@@ -770,8 +769,7 @@ fsdp_parse (const char *text_description
           }
           else if (!strncmp (fsdp_buf[0], "range", 5))
           {
-            if (media->a_range)
-              free (media->a_range);
+            free (media->a_range);
             media->a_range = strdup (fsdp_buf[1]);
           }
           else if (!strncmp (fsdp_buf[0], "framerate", 9))

Modified: trunk/stream/librtsp/rtsp.c
==============================================================================
--- trunk/stream/librtsp/rtsp.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/stream/librtsp/rtsp.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -291,7 +291,7 @@ static int rtsp_get_answers(rtsp_t *s) {
     if (!strncasecmp(answer,"Server:",7)) {
       char *buf = malloc(strlen(answer));
       sscanf(answer,"%*s %s",buf);
-      if (s->server) free(s->server);
+      free(s->server);
       s->server=strdup(buf);
       free(buf);
     }
@@ -612,7 +612,7 @@ char *rtsp_search_answers(rtsp_t *s, con
 
 void rtsp_set_session(rtsp_t *s, const char *id) {
 
-  if (s->session) free(s->session);
+  free(s->session);
 
   s->session=strdup(id);
 
@@ -686,7 +686,7 @@ void rtsp_unschedule_field(rtsp_t *s, co
     else
       ptr++;
   }
-  if (*ptr) free(*ptr);
+  free(*ptr);
   ptr++;
   do {
     *(ptr-1)=*ptr;

Modified: trunk/stream/librtsp/rtsp_rtp.c
==============================================================================
--- trunk/stream/librtsp/rtsp_rtp.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/stream/librtsp/rtsp_rtp.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -131,8 +131,7 @@ rtp_session_free (struct rtp_rtsp_sessio
   if (st->rtcp_socket != -1)
     close (st->rtcp_socket);
 
-  if (st->control_url)
-    free (st->control_url);
+  free (st->control_url);
   free (st);
 }
 

Modified: trunk/stream/librtsp/rtsp_session.c
==============================================================================
--- trunk/stream/librtsp/rtsp_session.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/stream/librtsp/rtsp_session.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -89,11 +89,11 @@ static void rtsp_close(rtsp_t *s) {
     closesocket (s->s);
   }
 
-  if (s->path) free(s->path);
-  if (s->host) free(s->host);
-  if (s->mrl) free(s->mrl);
-  if (s->session) free(s->session);
-  if (s->user_agent) free(s->user_agent);
+  free(s->path);
+  free(s->host);
+  free(s->mrl);
+  free(s->session);
+  free(s->user_agent);
   free(s->server);
   rtsp_free_answers(s);
   rtsp_unschedule_all(s);

Modified: trunk/stream/realrtsp/real.c
==============================================================================
--- trunk/stream/realrtsp/real.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/stream/realrtsp/real.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -507,8 +507,7 @@ rtsp_send_describe:
   }
 autherr:
 
-  if (authfield)
-     free(authfield);
+  free(authfield);
 
   if ( status<200 || status>299 )
   {

Modified: trunk/stream/realrtsp/rmff.c
==============================================================================
--- trunk/stream/realrtsp/rmff.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/stream/realrtsp/rmff.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -847,9 +847,9 @@ void rmff_free_header(rmff_header_t *h) 
 
   if (!h) return;
 
-  if (h->fileheader) free(h->fileheader);
-  if (h->prop) free(h->prop);
-  if (h->data) free(h->data);
+  free(h->fileheader);
+  free(h->prop);
+  free(h->data);
   if (h->cont)
   {
     free(h->cont->title);

Modified: trunk/stream/realrtsp/sdpplin.c
==============================================================================
--- trunk/stream/realrtsp/sdpplin.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/stream/realrtsp/sdpplin.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -368,14 +368,10 @@ void sdpplin_free(sdpplin_t *description
 
   for (i = 0; i < description->stream_count; i++) {
     if (description->stream[i]) {
-      if (description->stream[i]->stream_name)
-        free(description->stream[i]->stream_name);
-      if (description->stream[i]->mime_type)
-        free(description->stream[i]->mime_type);
-      if (description->stream[i]->mlti_data)
-        free(description->stream[i]->mlti_data);
-      if (description->stream[i]->asm_rule_book)
-        free(description->stream[i]->asm_rule_book);
+      free(description->stream[i]->stream_name);
+      free(description->stream[i]->mime_type);
+      free(description->stream[i]->mlti_data);
+      free(description->stream[i]->asm_rule_book);
       free(description->stream[i]->id);
       free(description->stream[i]);
     }
@@ -383,14 +379,10 @@ void sdpplin_free(sdpplin_t *description
 
   if(description->stream_count)
     free(description->stream);
-  if (description->title)
-    free(description->title);
-  if (description->author)
-    free(description->author);
-  if (description->copyright)
-    free(description->copyright);
-  if (description->abstract)
-    free(description->abstract);
+  free(description->title);
+  free(description->author);
+  free(description->copyright);
+  free(description->abstract);
 
   free(description);
 }

Modified: trunk/sub/sub.c
==============================================================================
--- trunk/sub/sub.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/sub/sub.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -1080,8 +1080,8 @@ void free_osd_list(void){
     mp_osd_obj_t* obj=vo_osd_list;
     while(obj){
 	mp_osd_obj_t* next=obj->next;
-	if (obj->alpha_buffer) free(obj->alpha_buffer);
-	if (obj->bitmap_buffer) free(obj->bitmap_buffer);
+	free(obj->alpha_buffer);
+	free(obj->bitmap_buffer);
 	free(obj);
 	obj=next;
     }

Modified: trunk/vidix/ivtv_vid.c
==============================================================================
--- trunk/vidix/ivtv_vid.c	Sat Nov 13 11:23:34 2010	(r32623)
+++ trunk/vidix/ivtv_vid.c	Sun Nov 14 10:12:34 2010	(r32624)
@@ -382,10 +382,8 @@ void ivtv_destroy(void)
 		close(yuvdev);
 	if(-1 != fbdev)
 		close(fbdev);
-	if(NULL != outbuf)
-		free(outbuf);
-	if(NULL != memBase)
-		free(memBase);
+	free(outbuf);
+	free(memBase);
 }
 
 int ivtv_get_caps(vidix_capability_t *to)


More information about the MPlayer-cvslog mailing list