• antirez's avatar
    Avoid valgrind memory leak false positive in processInlineBuffer(). · f2876f6c
    antirez authored
    zmalloc(0) cauesd to actually trigger a non-zero allocation since with
    standard libc malloc we have our own zmalloc header for memory tracking,
    but at the same time the returned pointer is at the end of the block and
    not in the middle. This triggers a false positive when testing with
    valgrind.
    
    When the inline protocol args count is 0, we now avoid reallocating
    c->argv, preventing the issue to happen.
    f2876f6c
networking.c 60.8 KB