diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-06-24 05:39:03 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-06-24 05:39:03 +0200 |
commit | e242b8353563ffc1c462bb615fc2c3d7ee7c870a (patch) | |
tree | cca3f4354c22dfcbfd078d31d0fca7caa75855a9 /src | |
parent | e77fb8ca5381687c7ae527e728884c3db26f1a9a (diff) |
Fix a memory leak in encryption. (Dominique Pelle)
Diffstat (limited to 'src')
-rw-r--r-- | src/memline.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/memline.c b/src/memline.c index 06b30cf728..aa901a9144 100644 --- a/src/memline.c +++ b/src/memline.c @@ -508,6 +508,7 @@ ml_set_crypt_key(buf, old_key, old_cm) idx = 0; /* start with first index in block 1 */ error = 0; buf->b_ml.ml_stack_top = 0; + vim_free(buf->b_ml.ml_stack); buf->b_ml.ml_stack = NULL; buf->b_ml.ml_stack_size = 0; /* no stack yet */ @@ -744,8 +745,8 @@ ml_open_file(buf) { if (*dirp == NUL) break; - /* There is a small chance that between chosing the swap file name and - * creating it, another Vim creates the file. In that case the + /* There is a small chance that between choosing the swap file name + * and creating it, another Vim creates the file. In that case the * creation will fail and we will use another directory. */ fname = findswapname(buf, &dirp, NULL); /* allocates fname */ if (fname == NULL) @@ -1239,7 +1240,7 @@ ml_recover() MSG_PUTS_ATTR(_(" cannot be used on this computer.\n"), attr | MSG_HIST); MSG_PUTS_ATTR(_("The file was created on "), attr | MSG_HIST); - /* avoid going past the end of a currupted hostname */ + /* avoid going past the end of a corrupted hostname */ b0p->b0_fname[0] = NUL; MSG_PUTS_ATTR(b0p->b0_hname, attr | MSG_HIST); MSG_PUTS_ATTR(_(",\nor the file has been damaged."), attr | MSG_HIST); |