[ovs-git] [openvswitch/ovs] 27af7a: dpif-netlink: Fix multiple-free and fd leak on err...

GitHub noreply at github.com
Thu Jun 1 23:40:06 UTC 2017


  Branch: refs/heads/branch-2.7
  Home:   https://github.com/openvswitch/ovs
  Commit: 27af7a0d0daa92bd699270bcc5b2931f4a0247bf
      https://github.com/openvswitch/ovs/commit/27af7a0d0daa92bd699270bcc5b2931f4a0247bf
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2017-06-01 (Thu, 01 Jun 2017)

  Changed paths:
    M lib/dpif-netlink.c

  Log Message:
  -----------
  dpif-netlink: Fix multiple-free and fd leak on error path.

This function attempts to open a bunch of new handlers.  If it fails, it
attempts to close all the handlers that have already been opened.
Unfortunately, the loop to close the opened handlers used the wrong array
index: 'i' instead of 'j'.  This fixes the problem.

Found by Coverity.

Reported-at: https://scan3.coverity.com/reports.htm#v16889/p10449/fileInstanceId=14762827&defectInstanceId=4305351&mergedDefectId=180429
Signed-off-by: Ben Pfaff <blp at ovn.org>
Acked-by: Justin Pettit <jpettit at ovn.org>




More information about the git mailing list