call freeFakeClientArgv when aof format error#6054
call freeFakeClientArgv when aof format error#6054ShooterIT wants to merge 1 commit intoredis:unstablefrom
Conversation
itamarhaber
left a comment
There was a problem hiding this comment.
LGTM, although I'm not sure why we bother with freeing everything correctly if we're gonna exit(1) anyway.
|
Thanks @itamarhaber May be to avoid warning of memory checking tools. |
|
@ShooterIT @itamarhaber I fixed it (with a different commit in order to have less code), because the same code path attempts to free memory, so it is correct to do so I guess even if we exit() later. Thanks. |
We exit later, so no bug fixed, but it is more correct. See #6054, thanks to @ShooterIT for finding the issue.
We exit later, so no bug fixed, but it is more correct. See #6054, thanks to @ShooterIT for finding the issue.
|
Yes. That is more elegant @antirez |
|
There is a problem, and I leave a comment in |
|
@ShooterIT you are right, thank you! Fixing. |
|
@ShooterIT we ok after baa88a1? |
|
I think it's ok, now @antirez |
|
Thank you @ShooterIT |
We exit later, so no bug fixed, but it is more correct. See redis#6054, thanks to @ShooterIT for finding the issue.
We exit later, so no bug fixed, but it is more correct. See #6054, thanks to @ShooterIT for finding the issue.
We exit later, so no bug fixed, but it is more correct. See redis#6054, thanks to @ShooterIT for finding the issue.
We exit later, so no bug fixed, but it is more correct. See redis#6054, thanks to @ShooterIT for finding the issue.
In aof.c:675
if (buf[0] != '$') goto fmterr;It will goto fmterr when the aof is bad file format, but the memory of argv isn't freed. We should free fake client‘s argv firstly.