Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <david@adalogics.com>
- Loading branch information