Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
8b30e47
)
SCTP: coverity warning fix
64/10564/2
author
Marco Varlese
<marco.varlese@suse.com>
Thu, 15 Feb 2018 12:45:39 +0000
(13:45 +0100)
committer
Dave Barach
<openvpp@barachs.net>
Thu, 15 Feb 2018 16:05:14 +0000
(16:05 +0000)
Change-Id: I1f8a325eac2a9e2c825996f04026ae86259a7ddd
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
src/vnet/sctp/sctp.c
patch
|
blob
|
history
diff --git
a/src/vnet/sctp/sctp.c
b/src/vnet/sctp/sctp.c
index
8fc5d9b
..
529e408
100644
(file)
--- a/
src/vnet/sctp/sctp.c
+++ b/
src/vnet/sctp/sctp.c
@@
-576,7
+576,11
@@
sctp_session_get_transport (u32 conn_index, u32 thread_index)
{
sctp_connection_t *sctp_conn =
sctp_connection_get (conn_index, thread_index);
- return &sctp_conn->sub_conn[MAIN_SCTP_SUB_CONN_IDX].connection;
+
+ if (PREDICT_TRUE (sctp_conn != NULL))
+ return &sctp_conn->sub_conn[MAIN_SCTP_SUB_CONN_IDX].connection;
+
+ return NULL;
}
transport_connection_t *