diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-06-05 11:42:11 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-06-05 12:49:27 -0400 |
commit | 44b6a7b5bf55d441aa15f647dac133d159d5dbb4 (patch) | |
tree | c079bae73911502ef2c7958482e78c9feaf6a137 | |
parent | 5115bc3f4f648b92f4c1eb47cd37aa8b682343a2 (diff) | |
download | rneovim-44b6a7b5bf55d441aa15f647dac133d159d5dbb4.tar.gz rneovim-44b6a7b5bf55d441aa15f647dac133d159d5dbb4.tar.bz2 rneovim-44b6a7b5bf55d441aa15f647dac133d159d5dbb4.zip |
undo: pvs/v547
buf is nonnull when xfree(buf) is executed.
free(NULL) is safe (for target compilers) so xfree(NULL) is also safe.
-rw-r--r-- | src/nvim/undo.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c index f52850f6f3..ffd613cec2 100644 --- a/src/nvim/undo.c +++ b/src/nvim/undo.c @@ -1018,9 +1018,7 @@ static ExtmarkUndoObject *unserialize_extmark(bufinfo_T *bi, bool *error, goto error; } - if (buf) { - xfree(buf); - } + xfree(buf); return extup; |