From 44b6a7b5bf55d441aa15f647dac133d159d5dbb4 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 5 Jun 2021 11:42:11 -0400 Subject: undo: pvs/v547 buf is nonnull when xfree(buf) is executed. free(NULL) is safe (for target compilers) so xfree(NULL) is also safe. --- src/nvim/undo.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') 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; -- cgit