[vim/vim] cscope connections leak when growing the array fails (PR #20662)

4 views
Skip to first unread message

Christian Brabandt

unread,
11:09 AM (3 hours ago) 11:09 AM
to vim/vim, Subscribed

Problem: In cs_insert_filelist() a failed vim_realloc() when growing the
csinfo[] array frees the array and resets csinfo/csinfo_size,
discarding the still-open existing connections: their fname,
ppath and flags are leaked and the cscope child processes are
orphaned, since cs_end()/cs_reset() can no longer reach them.
(Ao Xijie)
Solution: On realloc() failure keep the original array, which is still
valid, and only fail to add the new database.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/20662

Commit Summary

  • 60e9c54 cscope connections leak when growing the array fails

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20662@github.com>

Reply all
Reply to author
Forward
0 new messages