diff options
author | Steven Luong <sluong@cisco.com> | 2021-02-15 09:25:10 -0800 |
---|---|---|
committer | John Lo <lojultra2020@outlook.com> | 2021-02-23 23:38:08 +0000 |
commit | e46bd4cac4b80c553d39dbc2a06e5dd3f8eef671 (patch) | |
tree | 449d0fa3de3a35526d1ae68c20adabbca87e4245 /src/svm/svm_common.h | |
parent | 1a15eb7846c97a8b6b22d068eb35d2a3dba150e6 (diff) |
l2: coverity woe in l2_api.c
Coverify complains deref_ptr before null check.
deref_ptr: Directly dereferencing pointer reg.
1214 vl_reg = vl_api_client_index_to_registration (reg->client_index);
1215 ALWAYS_ASSERT (vl_reg != NULL);
1216
CID 216104 (#1 of 1): Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking reg suggests that it may be null, but it
has already been dereferenced on all paths leading to the check.
1217 if (reg && vl_api_can_send_msg (vl_reg))
I believe the check is for vl_reg instead of reg because vl_reg may be NULL
after the call vl_api_client_index_to_registration.
Type: fix
Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ic4eb2284e65c48396f20d5024a4241c80c70c886
Diffstat (limited to 'src/svm/svm_common.h')
0 files changed, 0 insertions, 0 deletions