mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-09 01:50:21 +01:00
platform: fix NULL pointer dereference
src/libnm-platform/nmp-object.c:930: var_deref_op: Dereferencing null pointer "klass->cmd_plobj_to_string_id".
Fixes: 8feeb199ad ('platform: drop redundant hook implementations from NMPObject classes')
This commit is contained in:
parent
a39ec8ca75
commit
2883203df4
1 changed files with 1 additions and 1 deletions
|
|
@ -926,7 +926,7 @@ nmp_object_to_string(const NMPObject *obj,
|
|||
|
||||
switch (to_string_mode) {
|
||||
case NMP_OBJECT_TO_STRING_ID:
|
||||
if (!klass->cmd_plobj_to_string_id)
|
||||
if (klass->cmd_plobj_to_string_id)
|
||||
return klass->cmd_plobj_to_string_id(&obj->object, buf, buf_size);
|
||||
g_snprintf(buf, buf_size, NM_HASH_OBFUSCATE_PTR_FMT, NM_HASH_OBFUSCATE_PTR(obj));
|
||||
return buf;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue