Commit ac5fe543 authored by ivoire's avatar ivoire
Browse files

Remove useless test (one more time).

parent 61abfdaf
......@@ -64,8 +64,7 @@ free_args(int i_size, char** ppsz_args)
int i_index;
for ( i_index = 0; i_index < i_size; i_index++ )
if( ppsz_args[i_index] )
free(ppsz_args[i_index]);
free( ppsz_args[i_index] );
free( ppsz_args );
}
......
......@@ -60,17 +60,13 @@ static inline void vlc_epg_Clean( vlc_epg_t *p_epg )
for( i = 0; i < p_epg->i_event; i++ )
{
vlc_epg_event_t *p_evt = p_epg->pp_event[i];
if( p_evt->psz_name )
free( p_evt->psz_name );
if( p_evt->psz_short_description )
free( p_evt->psz_short_description );
if( p_evt->psz_description )
free( p_evt->psz_description );
free( p_evt->psz_name );
free( p_evt->psz_short_description );
free( p_evt->psz_description );
free( p_evt );
}
TAB_CLEAN( p_epg->i_event, p_epg->pp_event );
if( p_epg->psz_name )
free( p_epg->psz_name );
free( p_epg->psz_name );
}
static inline void vlc_epg_AddEvent( vlc_epg_t *p_epg, int64_t i_start, int i_duration,
const char *psz_name, const char *psz_short_description, const char *psz_description )
......
......@@ -208,8 +208,7 @@ static inline void vlm_media_Copy( vlm_media_t *p_dst, vlm_media_t *p_src )
static inline void vlm_media_Clean( vlm_media_t *p_media )
{
int i;
if( p_media->psz_name )
free( p_media->psz_name );
free( p_media->psz_name );
for( i = 0; i < p_media->i_input; i++ )
free( p_media->ppsz_input[i]) ;
......@@ -219,13 +218,9 @@ static inline void vlm_media_Clean( vlm_media_t *p_media )
free( p_media->ppsz_option[i]) ;
TAB_CLEAN(p_media->i_option, p_media->ppsz_option );
if( p_media->psz_output )
free( p_media->psz_output );
free( p_media->psz_output );
if( p_media->b_vod )
{
if( p_media->vod.psz_mux )
free( p_media->vod.psz_mux );
}
free( p_media->vod.psz_mux );
}
static inline vlm_media_t *vlm_media_New(void)
{
......@@ -260,8 +255,7 @@ static inline void vlm_media_instance_Init( vlm_media_instance_t *p_instance )
}
static inline void vlm_media_instance_Clean( vlm_media_instance_t *p_instance )
{
if( p_instance->psz_name )
free( p_instance->psz_name );
free( p_instance->psz_name );
}
static inline vlm_media_instance_t *vlm_media_instance_New(void)
{
......
......@@ -92,7 +92,7 @@ LPVOID WINAPI HeapAlloc(HANDLE heap, DWORD flags, DWORD size)
WIN_BOOL WINAPI HeapFree(HANDLE heap, DWORD flags, LPVOID mem)
{
if (mem) free(mem);
free( mem );
//printf("HeapFree %p\n", mem);
//if (!mem)
// abort();
......@@ -437,8 +437,7 @@ WIN_BOOL WINAPI UnmapViewOfFile(LPVOID handle)
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);
......
......@@ -299,8 +299,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;
close(ldt_fs->fd);
......
......@@ -888,10 +888,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 );
......
......@@ -179,8 +179,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);
}
......@@ -197,7 +196,7 @@ void free_registry(void)
regs = 0;
}
if (localregpathname && localregpathname != regpathname)
if (localregpathname != regpathname)
free(localregpathname);
localregpathname = 0;
}
......@@ -421,8 +420,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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment