Re: [PATCH v2 03/22] object-file: fix memory leak when reading corrupted headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Patrick Steinhardt <ps@xxxxxx> writes:

> When reading corrupt object headers in `read_loose_object()`, then we

s/then//

> bail out immediately. This causes a memory leak though because we would
> have already initialized the zstream in `unpack_loose_header()`, and it
> is the callers responsibility to finish the zstream even on error. While
> this feels weird, other callsites do it correctly already.
>
> Fix this leak by ending the zstream even on errors. We may want to
> revisit this interface in the future such that the callee handles this
> for us already when there was an error.
>

[snip]

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux