mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-06-19 07:48:30 +02:00
src/devices/nm-device.c: resolve possible null pointer dereference
found by cppcheck [src/devices/nm-device.c:3032] -> [src/devices/nm-device.c:3025]: (warning) Either the condition '!handle' is redundant or there is possible null pointer dereference: handle. https://github.com/NetworkManager/NetworkManager/pull/352
This commit is contained in:
parent
adac530d7a
commit
e8588d0c6f
1 changed files with 4 additions and 4 deletions
|
|
@ -3021,15 +3021,15 @@ concheck_cb (NMConnectivity *connectivity,
|
|||
|
||||
self_keep_alive = g_object_ref (self);
|
||||
|
||||
/* keep @self alive, while we invoke callbacks. */
|
||||
priv = NM_DEVICE_GET_PRIVATE (self);
|
||||
|
||||
_LOGT (LOGD_CONCHECK, "connectivity: [Ipv%c] complete check (seq:%llu, state:%s)",
|
||||
nm_utils_addr_family_to_char (handle->addr_family),
|
||||
(long long unsigned) handle->seq,
|
||||
nm_connectivity_state_to_string (state));
|
||||
|
||||
/* keep @self alive, while we invoke callbacks. */
|
||||
priv = NM_DEVICE_GET_PRIVATE (self);
|
||||
|
||||
nm_assert (!handle || c_list_contains (&priv->concheck_lst_head, &handle->concheck_lst));
|
||||
nm_assert (handle && c_list_contains (&priv->concheck_lst_head, &handle->concheck_lst));
|
||||
|
||||
seq = handle->seq;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue