[groonga-commit:1303] ranguba/chupatext [master] add NULL check.

null+ranguba at clear-code.com null+ranguba at clear-code.com
Thu Sep 23 06:33:31 EDT 2010


Kouhei Sutou	2010-09-23 10:33:31 +0000 (Thu, 23 Sep 2010)

  New Revision: b845040e09e1acd946cba23cb82fe7536190e1e1

  Log:
    add NULL check.

  Modified files:
    chupatext/chupa_decomposer.c

  Modified: chupatext/chupa_decomposer.c (+3 -1)
===================================================================
--- chupatext/chupa_decomposer.c    2010-09-23 10:29:11 +0000 (9f9ed48)
+++ chupatext/chupa_decomposer.c    2010-09-23 10:33:31 +0000 (3c440cf)
@@ -134,7 +134,9 @@ chupa_decomposer_search(const gchar *const mime_type)
                 g_hash_table_lookup_extended(decomp_load_table, tmp_type->str, &key, &value)) {
                 mod = chupa_module_load_module(module_base_dir, (const gchar *)value);
             }
-            g_string_free(tmp_type, TRUE);
+            if (tmp_type) {
+                g_string_free(tmp_type, TRUE);
+            }
             if (!mod || !g_type_module_use(G_TYPE_MODULE(mod))) {
                 break;
             }



More information about the groonga-commit mailing list