==19022== Memcheck, a memory error detector ==19022== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al. ==19022== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info ==19022== Command: ./mongo-leak ==19022== status -1, last_error: 11000, last_error_str: E11000 duplicate key error index: yambing.test.$_id_ dup key: { : ObjectId('4fcfaa6a195b8f72bca9d637') } id saved: 4fcfaa6a195b8f72bca9d637 ==19022== ==19022== HEAP SUMMARY: ==19022== in use at exit: 167 bytes in 1 blocks ==19022== total heap usage: 67 allocs, 66 frees, 5,188 bytes allocated ==19022== ==19022== 167 bytes in 1 blocks are definitely lost in loss record 1 of 1 ==19022== at 0x400677E: malloc (vg_replace_malloc.c:195) ==19022== by 0x4010264: bson_malloc (bson.c:982) ==19022== by 0x40102FF: bson_init_size (bson.c:620) ==19022== by 0x4016A73: mongo_find_one (mongo.c:1235) ==19022== by 0x4016B9A: mongo_check_last_error.clone.2 (mongo.c:768) ==19022== by 0x804897B: main (mongo-leak.c:27) ==19022== ==19022== LEAK SUMMARY: ==19022== definitely lost: 167 bytes in 1 blocks ==19022== indirectly lost: 0 bytes in 0 blocks ==19022== possibly lost: 0 bytes in 0 blocks ==19022== still reachable: 0 bytes in 0 blocks ==19022== suppressed: 0 bytes in 0 blocks ==19022== ==19022== For counts of detected and suppressed errors, rerun with: -v ==19022== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 17 from 11)