summaryrefslogtreecommitdiff
path: root/src/ops.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2007-12-01 20:13:05 +0000
committerBram Moolenaar <Bram@vim.org>2007-12-01 20:13:05 +0000
commit0a30746d7097fa664b81ba652cf4bac818a3d164 (patch)
tree04ab368af4fdda0c309c294a74ed35e4a743bda5 /src/ops.c
parentc2a27c3dc3b21c6ad7a2eda1de61492894ebbb84 (diff)
downloadvim-0a30746d7097fa664b81ba652cf4bac818a3d164.zip
updated for version 7.1-166
Diffstat (limited to 'src/ops.c')
-rw-r--r--src/ops.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ops.c b/src/ops.c
index ea5e20bd6..82107cc48 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -927,8 +927,8 @@ get_register(name, copy)
int name;
int copy; /* make a copy, if FALSE make register empty. */
{
- static struct yankreg *reg;
- int i;
+ struct yankreg *reg;
+ int i;
#ifdef FEAT_CLIPBOARD
/* When Visual area changed, may have to update selection. Obtain the
@@ -967,7 +967,7 @@ get_register(name, copy)
}
/*
- * Put "reg" into register "name". Free any previous contents.
+ * Put "reg" into register "name". Free any previous contents and "reg".
*/
void
put_register(name, reg)
@@ -977,6 +977,7 @@ put_register(name, reg)
get_yank_register(name, 0);
free_yank_all();
*y_current = *(struct yankreg *)reg;
+ vim_free(reg);
# ifdef FEAT_CLIPBOARD
/* Send text written to clipboard register to the clipboard. */