]> granicus.if.org Git - vim/commitdiff
patch 8.0.0371: leaking memory when setting v:completed_item v8.0.0371
authorBram Moolenaar <Bram@vim.org>
Sat, 25 Feb 2017 20:39:17 +0000 (21:39 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 25 Feb 2017 20:39:17 +0000 (21:39 +0100)
Problem:    Leaking memory when setting v:completed_item.
Solution:   Or the flags instead of setting them.

src/eval.c
src/version.c

index 4fc9f743e80ebfd473544080b835f0eafb65203c..61843bcfbafee7874d44521dd0185d99633a1385 100644 (file)
@@ -6640,7 +6640,7 @@ set_vim_var_dict(int idx, dict_T *val)
            if (HASHITEM_EMPTY(hi))
                continue;
            --todo;
-           HI2DI(hi)->di_flags = DI_FLAGS_RO | DI_FLAGS_FIX;
+           HI2DI(hi)->di_flags |= DI_FLAGS_RO | DI_FLAGS_FIX;
        }
     }
 }
index 1482343e7f59c571b5a9d77cc51725f28b58f4aa..d8940c7dfea07ae46c40da6ed42525c844f448bb 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    371,
 /**/
     370,
 /**/