From: Philip Withnall Date: Tue, 26 Nov 2013 11:07:45 +0000 (+0000) Subject: gcontenttype: Fix a potential g_object_unref(NULL) call X-Git-Tag: 2.39.2~89 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=44af12aba114c82e04fa78eb2ad9aaf8aa5137b2;p=platform%2Fupstream%2Fglib.git gcontenttype: Fix a potential g_object_unref(NULL) call This can happen if the g_file_query_info() call fails, returning NULL. Found with scan-build. https://bugzilla.gnome.org/show_bug.cgi?id=113075 --- diff --git a/gio/gcontenttype.c b/gio/gcontenttype.c index 8dc5896..d54f042 100644 --- a/gio/gcontenttype.c +++ b/gio/gcontenttype.c @@ -1325,7 +1325,7 @@ matchlet_match (TreeMatchlet *matchlet, result = FALSE; } - g_object_unref (info); + g_clear_object (&info); g_object_unref (file); } while (!result);