Problem: memory leak in add_mark()
Solution: Free lpos in the error case when it hasn't been added to the
dict yet (Huihui Huang)
closes: #19827
Signed-off-by: Huihui Huang <625173@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
if (dict_add_string(d, "mark", mname) == FAIL
|| dict_add_list(d, "pos", lpos) == FAIL
|| (fname != NULL && dict_add_string(d, "file", fname) == FAIL))
+ {
+ if (lpos->lv_refcount == 0)
+ list_free(lpos);
return FAIL;
+ }
return OK;
}
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 258,
/**/
257,
/**/