mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 8.2.2457: Coverity warns for memory leak
Problem: Coverity warns for memory leak. Solution: Free memory when out of memory.
This commit is contained in:
@@ -1813,7 +1813,10 @@ cs_file_results(FILE *f, int *nummatches_a)
|
||||
|
||||
context = alloc(strlen(cntx)+5);
|
||||
if (context == NULL)
|
||||
{
|
||||
vim_free(fullname);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strcmp(cntx, "<global>")==0)
|
||||
strcpy(context, "<<global>>");
|
||||
|
Reference in New Issue
Block a user