Commit 9594a76
hdr_historgram_log: fix 3 memory leaks on histogram-counts
The fuzzer from #120
found some leaks when the `hdr_decode_compressed*` functions call
`hdr_init` but later fails and cleans up `h` by way of `hdr_free(h)`.
The problem is that the `counts` field on the histogram is leaked, which
is allocated
https://github.com/HdrHistogram/HdrHistogram_c/blob/8dcce8f68512fca460b171bccc3a5afce0048779/src/hdr_histogram.c#L424
and assigned to the `counts` field here:
https://github.com/HdrHistogram/HdrHistogram_c/blob/8dcce8f68512fca460b171bccc3a5afce0048779/src/hdr_histogram.c#L437
Signed-off-by: David Korczynski <[email protected]>1 parent 133e074 commit 9594a76
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
445 | | - | |
| 445 | + | |
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
| |||
547 | 547 | | |
548 | 548 | | |
549 | 549 | | |
550 | | - | |
| 550 | + | |
551 | 551 | | |
552 | 552 | | |
553 | 553 | | |
| |||
649 | 649 | | |
650 | 650 | | |
651 | 651 | | |
652 | | - | |
| 652 | + | |
653 | 653 | | |
654 | 654 | | |
655 | 655 | | |
| |||
0 commit comments