From: Bram Moolenaar <Bram@vim.org> Date: Sat, 25 Feb 2017 20:39:17 +0000 (+0100) Subject: patch 8.0.0371: leaking memory when setting v:completed_item X-Git-Tag: v8.0.0371 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=14c2e18b63faaa4056d987fd501a68480cb40c5c;p=vim patch 8.0.0371: leaking memory when setting v:completed_item Problem: Leaking memory when setting v:completed_item. Solution: Or the flags instead of setting them. --- diff --git a/src/eval.c b/src/eval.c index 4fc9f743e..61843bcfb 100644 --- a/src/eval.c +++ b/src/eval.c @@ -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; } } } diff --git a/src/version.c b/src/version.c index 1482343e7..d8940c7df 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 371, /**/ 370, /**/