mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-07 18:00:30 +01:00
libnm-core: do not access array if it is NULL
Coverity: Defect type: FORWARD_NULL libnm-core/nm-setting-8021x.c:1684: var_deref_op: Dereferencing null pointer "array".
This commit is contained in:
parent
e52f352339
commit
0da3b96ab5
1 changed files with 2 additions and 1 deletions
|
|
@ -1680,8 +1680,9 @@ file_to_secure_bytes (const char *filename)
|
|||
g_byte_array_append (array, (guint8 *) contents, length);
|
||||
g_assert (array->len == length);
|
||||
g_free (contents);
|
||||
return g_bytes_new_with_free_func (array->data, array->len, free_secure_bytes, array);
|
||||
}
|
||||
return g_bytes_new_with_free_func (array->data, array->len, free_secure_bytes, array);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue