undo: pvs/v547

buf is nonnull when xfree(buf) is executed.

free(NULL) is safe (for target compilers) so xfree(NULL) is also safe.
This commit is contained in:
Jan Edmund Lazo
2021-06-05 11:42:11 -04:00
parent 5115bc3f4f
commit 44b6a7b5bf

View File

@@ -1018,9 +1018,7 @@ static ExtmarkUndoObject *unserialize_extmark(bufinfo_T *bi, bool *error,
goto error;
}
if (buf) {
xfree(buf);
}
xfree(buf);
return extup;