summaryrefslogtreecommitdiff
path: root/src/ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ops.c')
-rw-r--r--src/ops.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/ops.c b/src/ops.c
index 1350d8264..830de0ba6 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -1235,8 +1235,7 @@ do_execreg(
EMSG(_(e_nolastcmd));
return FAIL;
}
- vim_free(new_last_cmdline); /* don't keep the cmdline containing @: */
- new_last_cmdline = NULL;
+ VIM_CLEAR(new_last_cmdline); /* don't keep the cmdline containing @: */
/* Escape all control characters with a CTRL-V */
p = vim_strsave_escaped_ext(last_cmdline,
(char_u *)"\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037", Ctrl_V, FALSE);
@@ -2995,8 +2994,7 @@ free_yank(long n)
#endif
vim_free(y_current->y_array[i]);
}
- vim_free(y_current->y_array);
- y_current->y_array = NULL;
+ VIM_CLEAR(y_current->y_array);
#ifdef AMIGA
if (n >= 1000)
MSG("");
@@ -6040,8 +6038,7 @@ finish_viminfo_registers(void)
vim_free(y_read_regs[i].y_array[j]);
vim_free(y_read_regs[i].y_array);
}
- vim_free(y_read_regs);
- y_read_regs = NULL;
+ VIM_CLEAR(y_read_regs);
}
}
@@ -7146,8 +7143,7 @@ str_to_reg(
/* Without any lines make the register empty. */
if (y_ptr->y_size + newlines == 0)
{
- vim_free(y_ptr->y_array);
- y_ptr->y_array = NULL;
+ VIM_CLEAR(y_ptr->y_array);
return;
}