Coverity issues in contrail-controller/cfg_mirror.cc

Bug #1770158 reported by Anda Nicolae on 2018-05-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R5.0
Fix Committed
Undecided
Anda Nicolae
Trunk
Fix Committed
Undecided
Anda Nicolae
OpenContrail
New
Undecided
Unassigned

Bug Description

Hi all,

I have run Coverity on branch R5.0 and it reported the following issues in contrail-controller/cfg_mirror.cc:
- Variable entry going out of scope leaks the storage it points to in cfg_mirror.cc:MirrorCfgTable::Add
- Variable entry going out of scope leaks the storage it points to in cfg_mirror.cc:IntfMirrorCfgTable::Add

Indeed, in both functions listed above, variable entry is not freed on else branch.

Review in progress for https://review.opencontrail.org/42899
Submitter: Anda Nicolae (<email address hidden>)

Review in progress for https://review.opencontrail.org/42900
Submitter: Anda Nicolae (<email address hidden>)

Jeba Paulaiyan (jebap) on 2018-05-10
tags: added: contrail-control

Review in progress for https://review.opencontrail.org/43015
Submitter: Anda Nicolae (<email address hidden>)

Review in progress for https://review.opencontrail.org/43016
Submitter: Anda Nicolae (<email address hidden>)

Reviewed: https://review.opencontrail.org/43015
Committed: http://github.com/Juniper/contrail-controller/commit/764963b7131684907f174b0ec7d39239c29b60f7
Submitter: Zuul v3 CI (<email address hidden>)
Branch: R5.0

commit 764963b7131684907f174b0ec7d39239c29b60f7
Author: Anda Nicolae <email address hidden>
Date: Wed May 9 15:45:19 2018 +0300

Coverity issues in contrail-controller/cfg_mirror.cc

I have run Coverity on branch R5.0 and it reported the following issues
in contrail-controller/cfg_mirror.cc:
- Variable entry going out of scope leaks the storage it points to in
cfg_mirror.cc:MirrorCfgTable::Add
- Variable entry going out of scope leaks the storage it points to in
cfg_mirror.cc:IntfMirrorCfgTable::Add

Indeed, in both functions listed above, variable entry is not freed on
else branch.

Change-Id: Ia083a3976bd1259e415195ae916a8dd377d50ffc
Closes-Bug: #1770158
Signed-off-by: Anda Nicolae <email address hidden>

Reviewed: https://review.opencontrail.org/43016
Committed: http://github.com/Juniper/contrail-controller/commit/2147207b81ea031bc7c3c6fe21b33a0d27fb6b45
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit 2147207b81ea031bc7c3c6fe21b33a0d27fb6b45
Author: Anda Nicolae <email address hidden>
Date: Wed May 9 15:45:19 2018 +0300

Coverity issues in contrail-controller/cfg_mirror.cc

I have run Coverity on branch R5.0 and it reported the following issues
in contrail-controller/cfg_mirror.cc:
- Variable entry going out of scope leaks the storage it points to in
cfg_mirror.cc:MirrorCfgTable::Add
- Variable entry going out of scope leaks the storage it points to in
cfg_mirror.cc:IntfMirrorCfgTable::Add

Indeed, in both functions listed above, variable entry is not freed on
else branch.

Change-Id: Ia083a3976bd1259e415195ae916a8dd377d50ffc
Closes-Bug: #1770158
Signed-off-by: Anda Nicolae <email address hidden>

Reviewed: https://review.opencontrail.org/42900
Committed: http://github.com/Juniper/contrail-controller/commit/393ee4e5c1e1fb7caf1d1ebe74f871bcb6e9f8d5
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit 393ee4e5c1e1fb7caf1d1ebe74f871bcb6e9f8d5
Author: Anda Nicolae <email address hidden>
Date: Wed May 9 15:45:19 2018 +0300

Coverity issues in contrail-controller/cfg_mirror.cc

I have run Coverity on branch R5.0 and it reported the following issues
in contrail-controller/cfg_mirror.cc:
- Variable entry going out of scope leaks the storage it points to in
cfg_mirror.cc:MirrorCfgTable::Add
- Variable entry going out of scope leaks the storage it points to in
cfg_mirror.cc:IntfMirrorCfgTable::Add

Indeed, in both functions listed above, variable entry is not freed on
else branch.

Change-Id: Iba56d378bffd104fd4a380ab56a7e304713506b8
Closes-Bug: #1770158
Signed-off-by: Anda Nicolae <email address hidden>

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers