[File] [PATCH] buffer_fill: fix double free of `ebuf` on read error
Christos Zoulas
christos at zoulas.com
Mon Jun 10 21:36:33 UTC 2019
On Jun 10, 2:06pm, kdudka at redhat.com (Kamil Dudka) wrote:
-- Subject: [File] [PATCH] buffer_fill: fix double free of `ebuf` on read err
Committed, thanks!
christos
| Bug: https://bugzilla.redhat.com/1685217
| ---
| src/buffer.c | 1 +
| 1 file changed, 1 insertion(+)
|
| diff --git a/src/buffer.c b/src/buffer.c
| index 6d8967d2..de9eace8 100644
| --- a/src/buffer.c
| +++ b/src/buffer.c
| @@ -77,6 +77,7 @@ buffer_fill(const struct buffer *bb)
| b->eoff = b->st.st_size - b->elen;
| if (pread(b->fd, b->ebuf, b->elen, b->eoff) == -1) {
| free(b->ebuf);
| + b->ebuf = NULL;
| goto out;
| }
|
| --
| 2.20.1
|
| --
| File mailing list
| File at astron.com
| https://mailman.astron.com/mailman/listinfo/file
-- End of excerpt from Kamil Dudka
More information about the File
mailing list