Coverity issues in contrail-controller/dns_mgr.cc

Bug #1770152 reported by Anda-Maria Nicolae
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R5.0
Fix Committed
Undecided
Anda-Maria Nicolae
Trunk
Fix Committed
Undecided
Anda-Maria 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/dns_mgr.cc:
- Variable resp going out of scope leaks the storage it points to in dns_mgr.cc:DnsManager::BindPendingMsgHandler
- Variable resp going out of scope leaks the storage it points to in dns_mgr.cc:DnsManager::VdnsRecordsMsgHandler

Indeed, in both functions (BindPendingMsgHandler and VdnsRecordsMsgHandler), variable resp is not freed on else branch.

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R5.0

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

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

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

Jeba Paulaiyan (jebap)
tags: added: contrail-control
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R5.0

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

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

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

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

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

commit db8ce51be96d7842e34bdb49594dc06280bc721d
Author: Anda Nicolae <email address hidden>
Date: Wed May 9 15:16:12 2018 +0300

Coverity issues in contrail-controller/dns_mgr.cc

I have run Coverity on branch R5.0 and it reported the following issues in contrail-controller/dns_mgr.cc:
- Variable resp going out of scope leaks the storage it points to in dns_mgr.cc:DnsManager::BindPendingMsgHandler
- Variable resp going out of scope leaks the storage it points to in dns_mgr.cc:DnsManager::VdnsRecordsMsgHandler

Indeed, in both functions (BindPendingMsgHandler and VdnsRecordsMsgHandler),
variable resp is not freed on else branch.

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

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

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

commit a82b097823f22d6d89656b45d583de9714dd6b64
Author: Anda Nicolae <email address hidden>
Date: Wed May 9 15:16:12 2018 +0300

Coverity issues in contrail-controller/dns_mgr.cc

I have run Coverity on branch R5.0 and it reported the following issues in contrail-controller/dns_mgr.cc:
- Variable resp going out of scope leaks the storage it points to in dns_mgr.cc:DnsManager::BindPendingMsgHandler
- Variable resp going out of scope leaks the storage it points to in dns_mgr.cc:DnsManager::VdnsRecordsMsgHandler

Indeed, in both functions (BindPendingMsgHandler and VdnsRecordsMsgHandler),
variable resp is not freed on else branch.

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

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

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

commit e20680d2b74e8355282f73c352196ef8a35e45e9
Author: Anda Nicolae <email address hidden>
Date: Wed May 9 15:16:12 2018 +0300

Coverity issues in contrail-controller/dns_mgr.cc

I have run Coverity on branch R5.0 and it reported the following issues in contrail-controller/dns_mgr.cc:
- Variable resp going out of scope leaks the storage it points to in dns_mgr.cc:DnsManager::BindPendingMsgHandler
- Variable resp going out of scope leaks the storage it points to in dns_mgr.cc:DnsManager::VdnsRecordsMsgHandler

Indeed, in both functions (BindPendingMsgHandler and VdnsRecordsMsgHandler),
variable resp is not freed on else branch.

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

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.