Coverity issues in contrail-controller/multicast/grpmgmt

Bug #1770578 reported by Anda Nicolae on 2018-05-11
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R5.0
Fix Committed
Medium
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/multicast/grpmgmt:

- leaked_storage: Variable cat_entry going out of scope leaks the storage it points to in gmp_addrlist.c:gmp_lookup_create_addr_cat_entry()
Indeed, cat_entry should be freed if the following condition is matched:
if (cat_entry->adcat_ent_ord == ORD_BAD_ORDINAL)

- leaked_storage: Variable addr_thread going out of scope leaks the storage it points to.
Indeed, addr_thread should be freed if the following condition is matched:
if (gmp_enqueue_addr_thread_addr(addr_thread, addr_ptr, IPV4_ADDR_LEN) < 0)

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

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

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

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

commit bb19b18a71528579d972ab4c719a1ecf7bb2b48d
Author: Anda Nicolae <email address hidden>
Date: Fri May 11 10:51:56 2018 +0300

Coverity issues in contrail-controller/multicast/grpmgmt

I have run Coverity on branch R5.0 and it reported the
following issues in contrail-controller/multicast/grpmgmt:

- leaked_storage: Variable cat_entry going out of scope leaks
the storage it points to in
gmp_addrlist.c:gmp_lookup_create_addr_cat_entry()
Indeed, cat_entry should be freed if the following condition is matched:
if (cat_entry->adcat_ent_ord == ORD_BAD_ORDINAL)

- leaked_storage: Variable addr_thread going out of scope leaks
the storage it points to in
igmp_protocol.c:igmp_parse_v3_report_packet()
Indeed, addr_thread should be freed if the following condition is matched:
if (gmp_enqueue_addr_thread_addr(addr_thread, addr_ptr, IPV4_ADDR_LEN) < 0)

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

OpenContrail Admin (ci-admin-f) wrote :

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

commit 175b7190b9d4dc925377e198dac63fa5ea10788d
Author: Anda Nicolae <email address hidden>
Date: Fri May 11 10:51:56 2018 +0300

Coverity issues in contrail-controller/multicast/grpmgmt

I have run Coverity on branch R5.0 and it reported the
following issues in contrail-controller/multicast/grpmgmt:

- leaked_storage: Variable cat_entry going out of scope leaks
the storage it points to in
gmp_addrlist.c:gmp_lookup_create_addr_cat_entry()
Indeed, cat_entry should be freed if the following condition is matched:
if (cat_entry->adcat_ent_ord == ORD_BAD_ORDINAL)

- leaked_storage: Variable addr_thread going out of scope leaks
the storage it points to in
igmp_protocol.c:igmp_parse_v3_report_packet()
Indeed, addr_thread should be freed if the following condition is matched:
if (gmp_enqueue_addr_thread_addr(addr_thread, addr_ptr, IPV4_ADDR_LEN) < 0)

Change-Id: I04cf563b5b831bf72b11cba7a2df0d9d23da56ec
Closes-Bug: #1770578
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