Fix some memory leaks.
authorMichael Vrable <mvrable@cs.ucsd.edu>
Thu, 5 Aug 2010 16:48:41 +0000 (09:48 -0700)
committerMichael Vrable <mvrable@cs.ucsd.edu>
Thu, 5 Aug 2010 16:48:41 +0000 (09:48 -0700)
bluesky/cloudlog.c

index 30c2db0..49099e1 100644 (file)
@@ -185,9 +185,6 @@ BlueSkyCloudPointer bluesky_cloudlog_serialize(BlueSkyCloudLog *log,
         return log->location;
     }
 
-    g_print("Flushing object %s to cloud...\n",
-            bluesky_cloudlog_id_to_string(log->id));
-
     for (int i = 0; i < log->links->len; i++) {
         BlueSkyCloudLog *ref = g_array_index(log->links,
                                              BlueSkyCloudLog *, i);
@@ -265,6 +262,8 @@ void bluesky_cloudlog_write_log(BlueSkyFS *fs)
 
         state->location.sequence++;
         state->location.offset = 0;
+    } else {
+        g_string_free(state->data, TRUE);
     }
 
     state->data = NULL;