forked from aniani/vim
patch 9.1.1035: Vim9: memory leak with blob2str()
Problem: Vim9: memory leak with blob2str() Solution: free converted_str (Yegappan Lakshmanan) closes: #16481 Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
2cb8246eb9
commit
90b397586d
@@ -1366,9 +1366,10 @@ f_blob2str(typval_T *argvars, typval_T *rettv)
|
||||
}
|
||||
}
|
||||
|
||||
if (list_append_string(rettv->vval.v_list, converted_str, -1) == FAIL)
|
||||
break;
|
||||
int ret = list_append_string(rettv->vval.v_list, converted_str, -1);
|
||||
vim_free(converted_str);
|
||||
if (ret == FAIL)
|
||||
break;
|
||||
}
|
||||
|
||||
done:
|
||||
|
Reference in New Issue
Block a user