Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hdr_historgram_log: fix 3 memory leaks on histogram-counts #122

Merged
merged 1 commit into from
Jan 15, 2024

Commits on Jan 14, 2024

  1. hdr_historgram_log: fix 3 memory leaks on histogram-counts

    The fuzzer from HdrHistogram#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>
    DavidKorczynski committed Jan 14, 2024
    Configuration menu
    Copy the full SHA
    586e5f7 View commit details
    Browse the repository at this point in the history