1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

dtinfo/dtinfogen: Fix segfault introduced by over zealously fixing coverity resource leak

This commit is contained in:
Peter Howkins 2018-04-05 18:16:10 +01:00
parent bc28c20524
commit 494fd64314

View file

@ -128,7 +128,7 @@ char *
SearchPath::get_real_path( const char *file_name )
{
CC_TPtrSlistIterator<CC_String> path_it( *search_path_table );
FILE *fp;
FILE *fp = NULL;
if (file_name == NULL || *file_name == '\0')
return NULL;
@ -149,7 +149,9 @@ SearchPath::get_real_path( const char *file_name )
fclose( fp );
return ( full_path_name );
}
fclose( fp );
if(fp) {
fclose( fp );
}
}
return NULL;