fix: memory leak

This commit is contained in:
Renge 2022-03-04 10:39:56 -05:00
parent 658e23eb93
commit 2b530625ab

View File

@ -181,12 +181,14 @@ rlcleanup:
if (cbuf) freebuffer(cbuf);
if (pbuf) {
if (!lines)
if (!lines) {
for (;;) {
lines = nextitem(pbuf);
if (!lines) break;
free(*lines);
}
}
freebuffer(pbuf);
}
return lines;