[
https://issues.apache.org/jira/browse/DISPATCH-1097?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16571044#comment-16571044
]
ASF GitHub Bot commented on DISPATCH-1097:
------------------------------------------
Github user codecov-io commented on the issue:
https://github.com/apache/qpid-dispatch/pull/354
#
[Codecov](https://codecov.io/gh/apache/qpid-dispatch/pull/354?src=pr&el=h1)
Report
> Merging
[#354](https://codecov.io/gh/apache/qpid-dispatch/pull/354?src=pr&el=desc) into
[master](https://codecov.io/gh/apache/qpid-dispatch/commit/83f5d524a63dec84f648a8afa126f794cbcafccb?src=pr&el=desc)
will **decrease** coverage by `0.04%`.
> The diff coverage is `42.85%`.
[](https://codecov.io/gh/apache/qpid-dispatch/pull/354?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #354 +/- ##
==========================================
- Coverage 84.56% 84.51% -0.05%
==========================================
Files 69 69
Lines 15720 15730 +10
==========================================
+ Hits 13293 13294 +1
- Misses 2427 2436 +9
```
| [Impacted
Files](https://codecov.io/gh/apache/qpid-dispatch/pull/354?src=pr&el=tree) |
Coverage Δ | |
|---|---|---|
|
[src/router\_core/terminus.c](https://codecov.io/gh/apache/qpid-dispatch/pull/354/diff?src=pr&el=tree#diff-c3JjL3JvdXRlcl9jb3JlL3Rlcm1pbnVzLmM=)
| `94.96% <ø> (ø)` | :arrow_up: |
|
[src/router\_node.c](https://codecov.io/gh/apache/qpid-dispatch/pull/354/diff?src=pr&el=tree#diff-c3JjL3JvdXRlcl9ub2RlLmM=)
| `93.51% <0%> (-0.75%)` | :arrow_down: |
|
[src/server.c](https://codecov.io/gh/apache/qpid-dispatch/pull/354/diff?src=pr&el=tree#diff-c3JjL3NlcnZlci5j)
| `84.37% <100%> (+0.02%)` | :arrow_up: |
|
[src/router\_core/route\_control.c](https://codecov.io/gh/apache/qpid-dispatch/pull/354/diff?src=pr&el=tree#diff-c3JjL3JvdXRlcl9jb3JlL3JvdXRlX2NvbnRyb2wuYw==)
| `95.83% <50%> (-0.66%)` | :arrow_down: |
|
[src/router\_core/connections.c](https://codecov.io/gh/apache/qpid-dispatch/pull/354/diff?src=pr&el=tree#diff-c3JjL3JvdXRlcl9jb3JlL2Nvbm5lY3Rpb25zLmM=)
| `95.42% <0%> (-0.12%)` | :arrow_down: |
------
[Continue to review full report at
Codecov](https://codecov.io/gh/apache/qpid-dispatch/pull/354?src=pr&el=continue).
> **Legend** - [Click here to learn
more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by
[Codecov](https://codecov.io/gh/apache/qpid-dispatch/pull/354?src=pr&el=footer).
Last update
[83f5d52...61b2e96](https://codecov.io/gh/apache/qpid-dispatch/pull/354?src=pr&el=lastupdated).
Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
> Fix Coverity issue on master branch
> -----------------------------------
>
> Key: DISPATCH-1097
> URL: https://issues.apache.org/jira/browse/DISPATCH-1097
> Project: Qpid Dispatch
> Issue Type: Bug
> Components: Container
> Affects Versions: 1.2.0
> Reporter: Ganesh Murthy
> Assignee: Ganesh Murthy
> Priority: Major
> Fix For: 1.3.0
>
>
> {noformat}
> 5 new defect(s) introduced to Apache Qpid dispatch-router found with Coverity
> Scan.
> 1 defect(s), reported by Coverity Scan earlier, were marked fixed in the
> recent build analyzed by Coverity Scan.
> New defect(s) Reported-by: Coverity Scan
> Showing 5 of 5 defect(s)
> ** CID 308513: Null pointer dereferences (FORWARD_NULL)
> /home/kgiusti/work/qpid-dispatch/src/router_core/route_control.c: 245 in
> qdr_auto_link_activate_CT()
> ________________________________________________________________________________________________________
> *** CID 308513: Null pointer dereferences (FORWARD_NULL)
> /home/kgiusti/work/qpid-dispatch/src/router_core/route_control.c: 245 in
> qdr_auto_link_activate_CT()
> 239 term = target;
> 240
> 241 key = (const char*)
> qd_hash_key_by_handle(al->addr->hash_handle);
> 242 if (key || al->external_addr) {
> 243 if (al->external_addr) {
> 244 qdr_terminus_set_address(term, al->external_addr);
> >>> CID 308513: Null pointer dereferences (FORWARD_NULL)
> >>> Dereferencing null pointer "key".
> 245 al->internal_addr = &key[2];
> 246 } else
> 247 qdr_terminus_set_address(term, &key[2]); // truncate
> the "Mp" annotation (where p = phase)
> 248 al->link = qdr_create_link_CT(core, conn,
> QD_LINK_ENDPOINT, al->dir, source, target);
> 249 al->link->auto_link = al;
> 250 al->state = QDR_AUTO_LINK_STATE_ATTACHING;
> ** CID 308512: (RESOURCE_LEAK)
> /home/kgiusti/work/qpid-dispatch/src/router_core/route_control.c: 252 in
> qdr_auto_link_activate_CT()
> /home/kgiusti/work/qpid-dispatch/src/router_core/route_control.c: 252 in
> qdr_auto_link_activate_CT()
> ________________________________________________________________________________________________________
> *** CID 308512: (RESOURCE_LEAK)
> /home/kgiusti/work/qpid-dispatch/src/router_core/route_control.c: 252 in
> qdr_auto_link_activate_CT()
> 246 } else
> 247 qdr_terminus_set_address(term, &key[2]); // truncate
> the "Mp" annotation (where p = phase)
> 248 al->link = qdr_create_link_CT(core, conn,
> QD_LINK_ENDPOINT, al->dir, source, target);
> 249 al->link->auto_link = al;
> 250 al->state = QDR_AUTO_LINK_STATE_ATTACHING;
> 251 }
> >>> CID 308512: (RESOURCE_LEAK)
> >>> Variable "term" going out of scope leaks the storage it points to.
> 252 }
> 253 }
> 254
> 255
> 256 static void qdr_auto_link_deactivate_CT(qdr_core_t *core,
> qdr_auto_link_t *al, qdr_connection_t *conn)
> 257 {
> /home/kgiusti/work/qpid-dispatch/src/router_core/route_control.c: 252 in
> qdr_auto_link_activate_CT()
> 246 } else
> 247 qdr_terminus_set_address(term, &key[2]); // truncate
> the "Mp" annotation (where p = phase)
> 248 al->link = qdr_create_link_CT(core, conn,
> QD_LINK_ENDPOINT, al->dir, source, target);
> 249 al->link->auto_link = al;
> 250 al->state = QDR_AUTO_LINK_STATE_ATTACHING;
> 251 }
> >>> CID 308512: (RESOURCE_LEAK)
> >>> Variable "source" going out of scope leaks the storage it points to.
> 252 }
> 253 }
> 254
> 255
> 256 static void qdr_auto_link_deactivate_CT(qdr_core_t *core,
> qdr_auto_link_t *al, qdr_connection_t *conn)
> 257 {
> ** CID 308511: (USE_AFTER_FREE)
> /home/kgiusti/work/qpid-dispatch/src/server.c: 978 in thread_run()
> /home/kgiusti/work/qpid-dispatch/src/server.c: 978 in thread_run()
> ________________________________________________________________________________________________________
> *** CID 308511: (USE_AFTER_FREE)
> /home/kgiusti/work/qpid-dispatch/src/server.c: 978 in thread_run()
> 972 pn_conn = conn;
> 973 assert(pn_conn == conn);
> 974
> 975 if (!qd_conn)
> 976 qd_conn = !!pn_conn ? (qd_connection_t*)
> pn_connection_get_context(pn_conn) : 0;
> 977
> >>> CID 308511: (USE_AFTER_FREE)
> >>> Calling "handle" frees pointer "qd_conn" which has already been freed.
> 978 running = handle(qd_server, e, conn, qd_conn);
> 979 }
> 980
> 981 //
> 982 // Notify the container that the batch is complete so it can
> do after-batch
> 983 // processing.
> /home/kgiusti/work/qpid-dispatch/src/server.c: 978 in thread_run()
> 972 pn_conn = conn;
> 973 assert(pn_conn == conn);
> 974
> 975 if (!qd_conn)
> 976 qd_conn = !!pn_conn ? (qd_connection_t*)
> pn_connection_get_context(pn_conn) : 0;
> 977
> >>> CID 308511: (USE_AFTER_FREE)
> >>> Passing freed pointer "qd_conn" as an argument to "handle".
> 978 running = handle(qd_server, e, conn, qd_conn);
> 979 }
> 980
> 981 //
> 982 // Notify the container that the batch is complete so it can
> do after-batch
> 983 // processing.
> /home/kgiusti/work/qpid-dispatch/src/server.c: 986 in thread_run()
> 980
> 981 //
> 982 // Notify the container that the batch is complete so it can
> do after-batch
> 983 // processing.
> 984 //
> 985 if (qd_conn)
> >>> CID 308511: (USE_AFTER_FREE)
> >>> Calling "qd_conn_event_batch_complete" dereferences freed pointer
> >>>"qd_conn".
> 986 qd_conn_event_batch_complete(qd_server->container,
> qd_conn);
> 987
> 988 pn_proactor_done(qd_server->proactor, events);
> 989 }
> 990 return NULL;
> 991 }
> ** CID 308510: (RESOURCE_LEAK)
> /home/kgiusti/work/qpid-dispatch/src/router_core/route_control.c: 252 in
> qdr_auto_link_activate_CT()
> /home/kgiusti/work/qpid-dispatch/src/router_core/route_control.c: 252 in
> qdr_auto_link_activate_CT()
> ________________________________________________________________________________________________________
> *** CID 308510: (RESOURCE_LEAK)
> /home/kgiusti/work/qpid-dispatch/src/router_core/route_control.c: 252 in
> qdr_auto_link_activate_CT()
> 246 } else
> 247 qdr_terminus_set_address(term, &key[2]); // truncate
> the "Mp" annotation (where p = phase)
> 248 al->link = qdr_create_link_CT(core, conn,
> QD_LINK_ENDPOINT, al->dir, source, target);
> 249 al->link->auto_link = al;
> 250 al->state = QDR_AUTO_LINK_STATE_ATTACHING;
> 251 }
> >>> CID 308510: (RESOURCE_LEAK)
> >>> Variable "term" going out of scope leaks the storage it points to.
> 252 }
> 253 }
> 254
> 255
> 256 static void qdr_auto_link_deactivate_CT(qdr_core_t *core,
> qdr_auto_link_t *al, qdr_connection_t *conn)
> 257 {
> /home/kgiusti/work/qpid-dispatch/src/router_core/route_control.c: 252 in
> qdr_auto_link_activate_CT()
> 246 } else
> 247 qdr_terminus_set_address(term, &key[2]); // truncate
> the "Mp" annotation (where p = phase)
> 248 al->link = qdr_create_link_CT(core, conn,
> QD_LINK_ENDPOINT, al->dir, source, target);
> 249 al->link->auto_link = al;
> 250 al->state = QDR_AUTO_LINK_STATE_ATTACHING;
> 251 }
> >>> CID 308510: (RESOURCE_LEAK)
> >>> Variable "target" going out of scope leaks the storage it points to.
> 252 }
> 253 }
> 254
> 255
> 256 static void qdr_auto_link_deactivate_CT(qdr_core_t *core,
> qdr_auto_link_t *al, qdr_connection_t *conn)
> 257 {
> ** CID 308509: Resource leaks (RESOURCE_LEAK)
> /home/kgiusti/work/qpid-dispatch/src/router_node.c: 1080 in
> AMQP_opened_handler()
> ________________________________________________________________________________________________________
> *** CID 308509: Resource leaks (RESOURCE_LEAK)
> /home/kgiusti/work/qpid-dispatch/src/router_node.c: 1080 in
> AMQP_opened_handler()
> 1074 free(item->host);
> 1075 free(item->port);
> 1076 free(item->hostname);
> 1077 free(item->host_port);
> 1078 free(item);
> 1079 }
> >>> CID 308509: Resource leaks (RESOURCE_LEAK)
> >>> Variable "item" going out of scope leaks the storage it points to.
> 1080 }
> 1081 pn_data_exit(props);
> 1082 }
> 1083 } // list_num_items > 0
> 1084 else {
> 1085 save_original_and_current_conn_info(conn);
> ________________________________________________________________________________________________________
>
>
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]