THRIFT-4376: fix a few high impact coverity defects:
1458947: memory leak in compiler
1458787: resource leak in c_glib led to discovery of assert() abuse
1459090: fix string.find result check in JSON processor (unlikely)

This closes #1404
diff --git a/lib/c_glib/test/testthrifttest.c b/lib/c_glib/test/testthrifttest.c
index 0211f53..23a934d 100755
--- a/lib/c_glib/test/testthrifttest.c
+++ b/lib/c_glib/test/testthrifttest.c
@@ -1,4 +1,3 @@
-#include <assert.h>
 #include <netdb.h>
 
 #include <thrift/c_glib/thrift.h>
@@ -87,14 +86,14 @@
 
   g_object_weak_ref (G_OBJECT (argument), set_indicator, (gpointer) &indicator);
 
-  assert (thrift_test_handler_test_insanity (NULL, &_return, argument, &error));
-  assert (! indicator);
+  g_assert (thrift_test_handler_test_insanity (NULL, &_return, argument, &error));
+  g_assert (! indicator);
 
   g_hash_table_unref (_return);
-  assert (! indicator);
+  g_assert (! indicator);
 
   g_object_unref (argument);
-  assert (indicator);
+  g_assert (indicator);
 }
 
 int