Skip to content

Commit

Permalink
Revert back to malloc() in rolling_median_t
Browse files Browse the repository at this point in the history
-   The change to `calloc()` in the `rolling_median_t` constructor has
    no effect on the `valgrind` warnings, so revert back to the original
    version of the code.
  • Loading branch information
Matyas Liptak committed Aug 26, 2019
1 parent 3bf2a12 commit 6117067
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/epee/include/rolling_median.h
Expand Up @@ -131,7 +131,7 @@ struct rolling_median_t
rolling_median_t(size_t N): N(N)
{
int size = N * (sizeof(Item) + sizeof(int) * 2);
data = (Item*)calloc(size, 1);
data = (Item*)malloc(size);
pos = (int*) (data + N);
heap = pos + N + (N / 2); //points to middle of storage.
clear();
Expand Down

0 comments on commit 6117067

Please sign in to comment.