memory: do not allocate space for multidata when it's already allocated
Allocating it again would leak the existing space. This fixes https://savannah.gnu.org/bugs/?60172. Reported-by: Mike Frysinger <vapier@gentoo.org> Bug existed since version 5.6, commit 1fdd23d3.
Этот коммит содержится в:
родитель
be9b1a1887
Коммит
49ca7e5aa8
@ -305,6 +305,7 @@ void precalc_multicolorinfo(void)
|
|||||||
|
|
||||||
/* For each line, allocate cache space for the multiline-regex info. */
|
/* For each line, allocate cache space for the multiline-regex info. */
|
||||||
for (line = openfile->filetop; line != NULL; line = line->next)
|
for (line = openfile->filetop; line != NULL; line = line->next)
|
||||||
|
if (!line->multidata)
|
||||||
line->multidata = nmalloc(openfile->syntax->nmultis * sizeof(short));
|
line->multidata = nmalloc(openfile->syntax->nmultis * sizeof(short));
|
||||||
|
|
||||||
for (ink = openfile->syntax->color; ink != NULL; ink = ink->next) {
|
for (ink = openfile->syntax->color; ink != NULL; ink = ink->next) {
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user