patch 9.0.1391: "clear" macros are not always used
Problem: "clear" macros are not always used.
Solution: Use ALLOC_ONE, VIM_CLEAR, CLEAR_POINTER and CLEAR_FIELD in more
places. (Yegappan Lakshmanan, closes #12104)
diff --git a/src/indent.c b/src/indent.c
index be4d563..3c38b4e 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -74,8 +74,7 @@
if (n <= 0 || n > TABSTOP_MAX)
{
semsg(_(e_invalid_argument_str), cp);
- vim_free(*array);
- *array = NULL;
+ VIM_CLEAR(*array);
return FAIL;
}
(*array)[t++] = n;