mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-06 07:58:00 +02:00
dns: Fix invalid memory access on Dnsconfd DBUS error
DBus errors were not properly handled after DBus calls and that caused SIGSEGV. Now they are checked. Fixes #1738 Fixes:b8714e86e4('dns: introduce configuration_serial support to the dnsconfd plugin') (cherry picked from commit4ad20787bb)
This commit is contained in:
parent
995a28fa1c
commit
de4f4e870d
1 changed files with 12 additions and 1 deletions
|
|
@ -132,6 +132,13 @@ dnsconfd_serial_retrieval_done(GObject *source_object, GAsyncResult *res, gpoint
|
|||
self = user_data;
|
||||
priv = NM_DNS_DNSCONFD_GET_PRIVATE(self);
|
||||
|
||||
if (!response) {
|
||||
_LOGW("dnsconfd serial retrieval failed: %s", error->message);
|
||||
priv->plugin_state = DNSCONFD_PLUGIN_IDLE;
|
||||
_nm_dns_plugin_update_pending_maybe_changed(NM_DNS_PLUGIN(self));
|
||||
return;
|
||||
}
|
||||
|
||||
nm_clear_g_cancellable(&priv->serial_cancellable);
|
||||
|
||||
g_variant_get(response, "(v)", &new_serial_variant);
|
||||
|
|
@ -201,8 +208,12 @@ dnsconfd_update_done(GObject *source_object, GAsyncResult *res, gpointer user_da
|
|||
|
||||
nm_clear_g_cancellable(&priv->update_cancellable);
|
||||
|
||||
if (!response)
|
||||
if (!response) {
|
||||
_LOGW("dnsconfd update failed: %s", error->message);
|
||||
priv->plugin_state = DNSCONFD_PLUGIN_IDLE;
|
||||
_nm_dns_plugin_update_pending_maybe_changed(NM_DNS_PLUGIN(self));
|
||||
return;
|
||||
}
|
||||
|
||||
/* By using &s we will get pointer to char data contained
|
||||
* in variant and thus no freing of dnsconfd_message is required */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue