[nit] Return early if no bytes left to return in thrift_memory_buffer_read
diff --git a/lib/c_glib/src/thrift/c_glib/transport/thrift_memory_buffer.c b/lib/c_glib/src/thrift/c_glib/transport/thrift_memory_buffer.c
index d38d494..9ef0057 100644
--- a/lib/c_glib/src/thrift/c_glib/transport/thrift_memory_buffer.c
+++ b/lib/c_glib/src/thrift/c_glib/transport/thrift_memory_buffer.c
@@ -91,6 +91,10 @@
     give = t->buf->len;
   }
 
+  if (give == 0) {
+    return -1;
+  }
+
   memcpy (buf, t->buf->data, give);
   g_byte_array_remove_range (t->buf, 0, give);