(trunk gtk) fix memory leak in the icons code.

This commit is contained in:
Charles Kerr 2009-04-23 15:45:30 +00:00
parent 237d218759
commit c0c3a00161
1 changed files with 4 additions and 1 deletions

View File

@ -282,7 +282,10 @@ const char *
get_mime_type_from_filename( const char * file G_GNUC_UNUSED )
{
#ifdef HAVE_GIO
return get_static_string( g_content_type_guess( file, NULL, 0, NULL ));
char * tmp = g_content_type_guess( file, NULL, 0, NULL );
const char * ret = get_static_string( tmp );
g_free( tmp );
return ret;
#else
return "uncertain";
#endif