Mercurial > vim
comparison src/evalfunc.c @ 10178:776d0aef1d80 v7.4.2359
commit https://github.com/vim/vim/commit/26fe0d56912e42c2b16a61b2480e19ba569aee98
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Sep 10 14:27:30 2016 +0200
patch 7.4.2359
Problem: Memory leak in timer_start().
Solution: Check the right field to be NULL.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 10 Sep 2016 14:30:07 +0200 |
parents | 3db463d4df25 |
children | 9415453b7bbd |
comparison
equal
deleted
inserted
replaced
10177:4ea4406b620c | 10178:776d0aef1d80 |
---|---|
12427 timer = create_timer(msec, repeat); | 12427 timer = create_timer(msec, repeat); |
12428 if (timer == NULL) | 12428 if (timer == NULL) |
12429 free_callback(callback, partial); | 12429 free_callback(callback, partial); |
12430 else | 12430 else |
12431 { | 12431 { |
12432 if (timer->tr_partial == NULL) | 12432 if (partial == NULL) |
12433 timer->tr_callback = vim_strsave(callback); | 12433 timer->tr_callback = vim_strsave(callback); |
12434 else | 12434 else |
12435 /* pointer into the partial */ | 12435 /* pointer into the partial */ |
12436 timer->tr_callback = callback; | 12436 timer->tr_callback = callback; |
12437 timer->tr_partial = partial; | 12437 timer->tr_partial = partial; |