fix: memory leak
This commit is contained in:
parent
658e23eb93
commit
2b530625ab
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user