[patch] fixed bug in vim_getenv()

2011-04-13 Thread Dominique Pellé
Hi Attached patch fixes a bug in vim_getenv() found with cppcheck static analyzer: $ cd vim/src ; cppcheck -f -I proto misc1.c [misc1.c:3956]: (error) Possible null pointer dereference: mustfree - otherwise it is redundant to check if mustfree is null at line 3953 Reading the code, I'd expect in

Re: [patch] fixed bug in vim_getenv()

2011-04-13 Thread H Xu
On 2011/4/14 3:05, Dominique Pellé wrote: Hi Attached patch fixes a bug in vim_getenv() found with cppcheck static analyzer: $ cd vim/src ; cppcheck -f -I proto misc1.c [misc1.c:3956]: (error) Possible null pointer dereference: mustfree - otherwise it is redundant to check if mustfree is null a

Re: [patch] fixed bug in vim_getenv()

2011-04-14 Thread Dominique Pellé
H Xu wrote: > On 2011/4/14 3:05, Dominique Pellé wrote: >> >> Hi >> >> Attached patch fixes a bug in vim_getenv() found >> with cppcheck static analyzer: >> >> $ cd vim/src ; cppcheck -f -I proto misc1.c >> [misc1.c:3956]: (error) Possible null pointer dereference: mustfree - >> otherwise it is re

Re: [patch] fixed bug in vim_getenv()

2011-04-14 Thread H Xu
On 2011/4/14 16:28, Dominique Pellé wrote: H Xu wrote: On 2011/4/14 3:05, Dominique Pellé wrote: Hi Attached patch fixes a bug in vim_getenv() found with cppcheck static analyzer: $ cd vim/src ; cppcheck -f -I proto misc1.c [misc1.c:3956]: (error) Possible null pointer dereference: mustfree

Re: [patch] fixed bug in vim_getenv()

2011-04-14 Thread Bram Moolenaar
Dominique Pelle wrote: > Attached patch fixes a bug in vim_getenv() found > with cppcheck static analyzer: > > $ cd vim/src ; cppcheck -f -I proto misc1.c > [misc1.c:3956]: (error) Possible null pointer dereference: mustfree - > otherwise it is redundant to check if mustfree is null at line 3953