avoid memory leak by appending, not prepending the word

This commit is contained in:
Holger Vogt 2024-12-13 15:11:49 +01:00
parent a6ad2470f1
commit 1e4a6ac8b8
1 changed files with 1 additions and 1 deletions

View File

@ -1296,7 +1296,7 @@ static struct inp_read_t inp_read(FILE* fp, int call_depth, const char* dir_name
add_to_sourcepath(sourcelineinfo, NULL); add_to_sourcepath(sourcelineinfo, NULL);
} }
sourceinfo = wl_cons(sourcelineinfo, sourceinfo); wl_append_word(&sourceinfo, &sourceinfo, sourcelineinfo);
/* First read in all lines & put them in the struct cc */ /* First read in all lines & put them in the struct cc */
for (;;) { for (;;) {