[ovs-dev] [PATCH] ofproto-dpif-ipfix: Fix severe memory leak in ipfix_send_template_msgs().
Justin Pettit
jpettit at ovn.org
Fri Jun 2 00:11:37 UTC 2017
> On May 26, 2017, at 9:14 PM, Ben Pfaff <blp at ovn.org> wrote:
>
> This fixes a seemingly severe memory leak in ipfix_send_template_msgs().
> This function was setting up a buffer with a stub, but only the first 4
> or 8 bytes of the stub were actually used because the "sizeof" call used
> to size it was actually getting the size of a pointer. It never freed
> the buffer, leaking it.
>
> Additionally, after this code sent a template message, it started over
> from the same undersized stub, leaking another block of memory.
>
> This commit fixes both problems.
>
> Found by Coverity.
>
> CC: Romain Lenglet <romain.lenglet at oracle.com>
> Reported-at: https://scan3.coverity.com/reports.htm#v16889/p10449/fileInstanceId=14762995&defectInstanceId=4304799&mergedDefectId=180398
> Signed-off-by: Ben Pfaff <blp at ovn.org>
Acked-by: Justin Pettit <jpettit at ovn.org>
Thanks for running through the Coverity reports and fixing all these issues!
--Justin
More information about the dev
mailing list