Commit 28530239 authored by Jiří Klimeš's avatar Jiří Klimeš

platform: fix a memory leak on an error

parent a3f3d76b
......@@ -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;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment