Re: [PATCH v3 1/3] Fix memory leak in apply_patch in apply.c.

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

 



Jared Hance <jaredhance@xxxxxxxxx> writes:

> In the while loop inside apply_patch, patch is dynamically allocated
> with a calloc. However, only unused patches are actually free'd; the
> rest are left in a memory leak. Since a list is actively built up
> consisting of the used patches, they can simply be iterated and free'd
> at the end of the function.
> ...

Thanks.

This more-or-less looks good modulo minor style issues.  We might
also want to make rejected a one-bit bitfield that sits next to the
new free_patch field to share the same word, but that is a separate
topic.

Will queue.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]