comparison src/if_py_both.h @ 21083:cc4914752841 v8.2.1093

patch 8.2.1093: Python: double free when adding item to dict fails Commit: https://github.com/vim/vim/commit/de19b745eee06a8a204988ae9989d97143caece9 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jun 29 23:07:44 2020 +0200 patch 8.2.1093: Python: double free when adding item to dict fails Problem: Python: double free when adding item to dict fails. Solution: Remove vim_free() call.
author Bram Moolenaar <Bram@vim.org>
date Mon, 29 Jun 2020 23:15:04 +0200
parents d571231175b4
children 10eb6c38938c
comparison
equal deleted inserted replaced
21082:8da85d1250be 21083:cc4914752841
1911 } 1911 }
1912 di->di_tv.v_type = VAR_UNKNOWN; 1912 di->di_tv.v_type = VAR_UNKNOWN;
1913 1913
1914 if (dict_add(dict, di) == FAIL) 1914 if (dict_add(dict, di) == FAIL)
1915 { 1915 {
1916 vim_free(di);
1917 dictitem_free(di); 1916 dictitem_free(di);
1918 RAISE_KEY_ADD_FAIL(key); 1917 RAISE_KEY_ADD_FAIL(key);
1919 Py_XDECREF(todecref); 1918 Py_XDECREF(todecref);
1920 return -1; 1919 return -1;
1921 } 1920 }