fix: memory leak

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

View File

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