diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-12-26 22:57:42 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-12-26 22:57:42 +0100 |
commit | e6fdf79980c0f2856700d4f46de700293f477429 (patch) | |
tree | 3234f99e0464e97f36e6b5b4086f95b469806552 /src/proto/dict.pro | |
parent | c57463c9c6ee893285f553e0ac3b2fe5935f16b8 (diff) |
patch 8.1.0642: swapinfo() leaks memoryv8.1.0642
Problem: swapinfo() leaks memory.
Solution: Avoid allocating the strings twice.
Diffstat (limited to 'src/proto/dict.pro')
-rw-r--r-- | src/proto/dict.pro | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/proto/dict.pro b/src/proto/dict.pro index 94ed2a0855..b09a647bd4 100644 --- a/src/proto/dict.pro +++ b/src/proto/dict.pro @@ -15,6 +15,7 @@ dict_T *dict_copy(dict_T *orig, int deep, int copyID); int dict_add(dict_T *d, dictitem_T *item); int dict_add_number(dict_T *d, char *key, varnumber_T nr); int dict_add_string(dict_T *d, char *key, char_u *str); +int dict_add_string_len(dict_T *d, char *key, char_u *str, int len); int dict_add_list(dict_T *d, char *key, list_T *list); int dict_add_dict(dict_T *d, char *key, dict_T *dict); long dict_len(dict_T *d); |