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/testsimpleserver.c b/lib/c_glib/test/testsimpleserver.c
index 3af2eeb..3c6f2e8 100755
--- a/lib/c_glib/test/testsimpleserver.c
+++ b/lib/c_glib/test/testsimpleserver.c
@@ -17,7 +17,6 @@
  * under the License.
  */
 
-#include <assert.h>
 #include <glib.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -89,7 +88,7 @@
 
   /* run the server in a child process */
   pid = fork ();
-  assert (pid >= 0);
+  g_assert (pid >= 0);
 
   if (pid == 0)
   {
@@ -103,8 +102,8 @@
     g_object_unref (ss);
     g_object_unref (tss);
     g_object_unref (p);
-    assert (wait (&status) == pid);
-    assert (status == SIGINT);
+    g_assert (wait (&status) == pid);
+    g_assert (status == SIGINT);
   }
 }