Mercurial > vim
comparison src/ex_getln.c @ 15064:7b2dcca9e0c1 v8.1.0543
patch 8.1.0543: Coverity warns for leaking memory and using wrong struct
commit https://github.com/vim/vim/commit/4e303c8ba8dcd0566a1ad7c82ff18eb016eea335
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Nov 24 14:27:44 2018 +0100
patch 8.1.0543: Coverity warns for leaking memory and using wrong struct
Problem: Coverity warns for leaking memory and using wrong struct.
Solution: Free pointer when allocation fails. Change "boff" to "loff".
(closes #3634)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 24 Nov 2018 14:30:08 +0100 |
parents | 676db1b7fc35 |
children | 70aa5caa9f0d |
comparison
equal
deleted
inserted
replaced
15063:8f098d4eca24 | 15064:7b2dcca9e0c1 |
---|---|
1376 | 1376 |
1377 KeyTyped = FALSE; /* Don't do p_wc completion. */ | 1377 KeyTyped = FALSE; /* Don't do p_wc completion. */ |
1378 redrawcmd(); | 1378 redrawcmd(); |
1379 goto cmdline_changed; | 1379 goto cmdline_changed; |
1380 } | 1380 } |
1381 vim_free(p); | |
1381 } | 1382 } |
1382 } | 1383 } |
1383 beep_flush(); | 1384 beep_flush(); |
1384 got_int = FALSE; /* don't abandon the command line */ | 1385 got_int = FALSE; /* don't abandon the command line */ |
1385 did_emsg = FALSE; | 1386 did_emsg = FALSE; |