algernon/libmongo-client — pull request #13 by 3d0c (2012-11-26 14:23:04+00:00)
Title: Memory leak.

Hello.

Looks like You have forgotten to free(oid) here.

The Valgrind log:
``
==20822== 12 bytes in 1 blocks are definitely lost in loss record 5 of 25
==20822== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20822== by 0x4E7FAE0: g_malloc0 (gmem.c:189)
==20822== by 0x513051F: mongo_util_oid_new_with_time (mongo-utils.c:69)
==20822== by 0x5134D5A: mongo_sync_gridfs_chunked_file_new_from_buffer (sync-gridfs-chunk.c:230)
``