antirez / antirez/sds

valgrind reports realloc-related memory leaks

未关闭
#41 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C
星标
5.6k
派生
510
PR 合并指标
30 天内没有已合并 PR

描述

There is something about sdsMakeRoomFor that leaks memory, at least according to valgrind:

```
==31090== HEAP SUMMARY:
==31090== in use at exit: 40 bytes in 2 blocks
==31090== total heap usage: 33 allocs, 31 frees, 526 bytes allocated
==31090==
==31090== 13 bytes in 1 blocks are definitely lost in loss record 1 of 2
==31090== at 0x4C2CE8E: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==31090== by 0x401B51: sdsMakeRoomFor (sds.c:160)
==31090== by 0x40132A: main (sds.c:926)
==31090==
==31090== 27 bytes in 1 blocks are definitely lost in loss record 2 of 2
==31090== at 0x4C2CE8E: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==31090== by 0x401B51: sdsMakeRoomFor (sds.c:160)
==31090== by 0x401CF0: sdscatlen (sds.c:269)
==31090== by 0x401EFA: sdscatvprintf (sds.c:342)
==31090== by 0x401FA6: sdscatprintf (sds.c:367)
==31090== by 0x4026AE: sdscatrepr (sds.c:602)
==31090== by 0x40126A: main (sds.c:915)
==31090==
==31090== LEAK SUMMARY:
==31090== definitely lost: 40 bytes in 2 blocks
==31090== indirectly lost: 0 bytes in 0 blocks
==31090== possibly lost: 0 bytes in 0 blocks
==31090== still reachable: 0 bytes in 0 blocks
==31090== suppressed: 0 bytes in 0 blocks
```

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。