fix: memory leak
This commit is contained in:
parent
658e23eb93
commit
2b530625ab
|
@ -181,13 +181,15 @@ rlcleanup:
|
|||
|
||||
if (cbuf) freebuffer(cbuf);
|
||||
if (pbuf) {
|
||||
if (!lines)
|
||||
if (!lines) {
|
||||
for (;;) {
|
||||
lines = nextitem(pbuf);
|
||||
if (!lines) break;
|
||||
free(*lines);
|
||||
}
|
||||
}
|
||||
freebuffer(pbuf);
|
||||
}
|
||||
|
||||
return lines;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user