fix another leak, an invalid free, and a simplify error handling

2008-11-18  Jens Granseuer  <jensgr@gmx.net>

	* font-viewer/font-view.c: (add_face_info), (set_icon):
	* font-viewer/ftstream-vfs.c: (vfs_stream_open): fix another
	leak, an invalid free, and a simplify error handling

svn path=/trunk/; revision=9144
This commit is contained in:
Jens Granseuer 2008-11-18 20:04:02 +00:00 committed by Jens Granseuer
parent afbe70bca0
commit cabbecfa4b
3 changed files with 18 additions and 14 deletions

View file

@ -89,17 +89,17 @@ vfs_stream_open(FT_Stream stream,
info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_SIZE,
G_FILE_QUERY_INFO_NONE, NULL, &error);
g_object_unref (file);
if (! info) {
g_warning (error->message);
g_error_free (error);
g_object_unref (file);
return FT_Err_Cannot_Open_Resource;
}
stream->size = g_file_info_get_size (info);
g_object_unref (file);
g_object_unref (info);
stream->descriptor.pointer = handle;