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/testdebugproto.c b/lib/c_glib/test/testdebugproto.c
index 47ac588..109a48b 100644
--- a/lib/c_glib/test/testdebugproto.c
+++ b/lib/c_glib/test/testdebugproto.c
@@ -17,7 +17,6 @@
  * under the License.
  */
 
-#include <assert.h>
 #include <math.h>
 #include <string.h>
 #include <glib-object.h>
@@ -838,11 +837,11 @@
                                    NULL);
 
   /* TTestInheritedClient inherits from TTestSrvClient */
-  assert (g_type_is_a (T_TEST_TYPE_INHERITED_CLIENT,
+  g_assert (g_type_is_a (T_TEST_TYPE_INHERITED_CLIENT,
                        T_TEST_TYPE_SRV_CLIENT));
 
   /* TTestInheritedClient implements TTestSrvClient's interface */
-  assert (g_type_is_a (T_TEST_TYPE_INHERITED_CLIENT,
+  g_assert (g_type_is_a (T_TEST_TYPE_INHERITED_CLIENT,
                        T_TEST_TYPE_SRV_IF));
 
   /* TTestInheritedClient's inherited properties can be set and retrieved */
@@ -856,8 +855,8 @@
                 "output_protocol", &output_protocol,
                 NULL);
 
-  assert (input_protocol == G_OBJECT(protocol));
-  assert (output_protocol == G_OBJECT(protocol));
+  g_assert (input_protocol == G_OBJECT(protocol));
+  g_assert (output_protocol == G_OBJECT(protocol));
 
   g_object_unref (output_protocol);
   g_object_unref (input_protocol);