[ovs-git] [openvswitch/ovs] 4d6f69: ofproto-dpif-ipfix: Fix severe memory leak in ipfi...

GitHub noreply at github.com
Wed Jun 28 17:18:27 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 4d6f69df54b7d6ec2956875c683a9564cb175662
      https://github.com/openvswitch/ovs/commit/4d6f69df54b7d6ec2956875c683a9564cb175662
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2017-06-27 (Tue, 27 Jun 2017)

  Changed paths:
    M ofproto/ofproto-dpif-ipfix.c

  Log Message:
  -----------
  ofproto-dpif-ipfix: Fix severe memory leak in ipfix_send_template_msgs().

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.

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>
Signed-off-by: Justin Pettit <jpettit at ovn.org>




More information about the git mailing list