mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-04 04:50:30 +01:00
libnm-util: remove unneeded check for non-null after dereferencing pointer
Since commit 01b9b4104c, we assume
that @error is properly set. No need to check for non-null.
Found by coverity.
This commit is contained in:
parent
df9ac197c0
commit
a5e09d2887
1 changed files with 2 additions and 4 deletions
|
|
@ -1515,15 +1515,13 @@ nm_utils_uuid_generate_from_string (const char *s)
|
|||
|
||||
if (!nm_utils_init (&error)) {
|
||||
g_warning ("error initializing crypto: %s", error->message);
|
||||
if (error)
|
||||
g_error_free (error);
|
||||
g_error_free (error);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!crypto_md5_hash (NULL, 0, s, strlen (s), (char *) uuid, sizeof (uuid), &error)) {
|
||||
g_warning ("error generating UUID: %s", error->message);
|
||||
if (error)
|
||||
g_error_free (error);
|
||||
g_error_free (error);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue