mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-07 16:50:35 +01:00
platform: fix a memory leak on an error
This commit is contained in:
parent
a3f3d76b24
commit
28530239fa
1 changed files with 1 additions and 0 deletions
|
|
@ -1311,6 +1311,7 @@ sysctl_get (NMPlatform *platform, const char *path)
|
|||
|
||||
if (!g_file_get_contents (path, &contents, NULL, &error)) {
|
||||
error ("error reading %s: %s", path, error->message);
|
||||
g_clear_error (&error);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue