Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
NetworkManager
NetworkManager
Commits
330cb356
Commit
330cb356
authored
Oct 27, 2010
by
Dan Williams
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
policy: make sure we have a valid settings object
parent
02711a0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/nm-policy.c
src/nm-policy.c
+2
-2
No files found.
src/nm-policy.c
View file @
330cb356
...
...
@@ -1130,6 +1130,7 @@ nm_policy_new (NMManager *manager,
policy
=
g_malloc0
(
sizeof
(
NMPolicy
));
policy
->
manager
=
g_object_ref
(
manager
);
policy
->
settings
=
g_object_ref
(
settings
);
policy
->
update_state_id
=
0
;
/* Grab hostname on startup and use that if nothing provides one */
...
...
@@ -1236,8 +1237,6 @@ nm_policy_destroy (NMPolicy *policy)
}
g_slist_free
(
policy
->
dev_signal_ids
);
g_object_unref
(
policy
->
settings
);
/* Rewrite /etc/hosts on exit to ensure we don't leave stale IP addresses
* lying around. FIXME: this will take out a valid IP address of an
* ethernet device we're leaving active (ie, a connection we can "assume"
...
...
@@ -1250,6 +1249,7 @@ nm_policy_destroy (NMPolicy *policy)
g_free
(
policy
->
orig_hostname
);
g_free
(
policy
->
cur_hostname
);
g_object_unref
(
policy
->
settings
);
g_object_unref
(
policy
->
manager
);
g_free
(
policy
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment