Mercurial > vim
comparison src/eval.c @ 9163:731ee601de16 v7.4.1865
commit https://github.com/vim/vim/commit/9ad73239c26467832a5b553b2a4b99d7ffbaa25e
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jun 1 22:08:17 2016 +0200
patch 7.4.1865
Problem: Memory leaks in tet49. (Dominique Pelle)
Solution: Use NULL instead of an empty string.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 01 Jun 2016 22:15:05 +0200 |
parents | e316b83892c1 |
children | 062eb6d28b0c |
comparison
equal
deleted
inserted
replaced
9162:9652f2e50ea1 | 9163:731ee601de16 |
---|---|
5296 /* If evaluate is FALSE rettv->v_type was not set in | 5296 /* If evaluate is FALSE rettv->v_type was not set in |
5297 * get_func_tv, but it's needed in handle_subscript() to parse | 5297 * get_func_tv, but it's needed in handle_subscript() to parse |
5298 * what follows. So set it here. */ | 5298 * what follows. So set it here. */ |
5299 if (rettv->v_type == VAR_UNKNOWN && !evaluate && **arg == '(') | 5299 if (rettv->v_type == VAR_UNKNOWN && !evaluate && **arg == '(') |
5300 { | 5300 { |
5301 rettv->vval.v_string = vim_strsave((char_u *)""); | 5301 rettv->vval.v_string = NULL; |
5302 rettv->v_type = VAR_FUNC; | 5302 rettv->v_type = VAR_FUNC; |
5303 } | 5303 } |
5304 | 5304 |
5305 /* Stop the expression evaluation when immediately | 5305 /* Stop the expression evaluation when immediately |
5306 * aborting on error, or when an interrupt occurred or | 5306 * aborting on error, or when an interrupt occurred or |