]> granicus.if.org Git - vim/commitdiff
patch 8.2.1093: Python: double free when adding item to dict fails v8.2.1093
authorBram Moolenaar <Bram@vim.org>
Mon, 29 Jun 2020 21:07:44 +0000 (23:07 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 29 Jun 2020 21:07:44 +0000 (23:07 +0200)
Problem:    Python: double free when adding item to dict fails.
Solution:   Remove vim_free() call.

src/if_py_both.h
src/version.c

index e262d1f75fd9a72adfec5fc1bf1c637ab6a99f6a..44b4baffe300a93b2f6807ac3920029ab6e8a64c 100644 (file)
@@ -1913,7 +1913,6 @@ DictionaryAssItem(
 
        if (dict_add(dict, di) == FAIL)
        {
-           vim_free(di);
            dictitem_free(di);
            RAISE_KEY_ADD_FAIL(key);
            Py_XDECREF(todecref);
index cac669e4252018eff2f33e7c32addda5c7e5cb1f..3697248306dcc30678e240bc22836613845438d7 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1093,
 /**/
     1092,
 /**/