Commit a6af4262 authored by Thomas Haller's avatar Thomas Haller
Browse files

manager: fix memleak in error-path of _internal_enable()

parent 7871a8fb
......@@ -4061,18 +4061,19 @@ static void
_internal_enable (NMManager *self, gboolean enable)
NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
GError *err = NULL;
GError *error = NULL;
/* Update "NetworkingEnabled" key in state file */
if (priv->state_file) {
if (!write_value_to_state_file (priv->state_file,
"main", "NetworkingEnabled",
G_TYPE_BOOLEAN, (gpointer) &enable,
&err)) {
&error)) {
/* Not a hard error */
_LOGW (LOGD_SUSPEND, "writing to state file %s failed: %s",
g_clear_error (&error);
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