From 526b484be1981b4bfcc5e48d5480c6ac7ccd8b66 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Mon, 30 Nov 2020 22:32:33 +0100 Subject: [PATCH] dns: sd-resolved: fix hash table iteration g_hash_table_iter_next() wants a (gpointer *), not an (int *). Fixes: f70ee67058c9 ('dns: sd-resolved: reset interface configuration on deactivation') --- src/dns/nm-dns-systemd-resolved.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dns/nm-dns-systemd-resolved.c b/src/dns/nm-dns-systemd-resolved.c index dccc6337a5..6d37f4022a 100644 --- a/src/dns/nm-dns-systemd-resolved.c +++ b/src/dns/nm-dns-systemd-resolved.c @@ -422,6 +422,7 @@ update(NMDnsPlugin * plugin, gs_free gpointer * interfaces_keys = NULL; guint interfaces_len; int ifindex; + gpointer pointer; NMDnsConfigIPData *ip_data; GHashTableIter iter; guint i; @@ -463,7 +464,8 @@ update(NMDnsPlugin * plugin, * resolved, and the current update doesn't contain that interface, * reset the resolved configuration for that ifindex. */ g_hash_table_iter_init(&iter, priv->dirty_interfaces); - while (g_hash_table_iter_next(&iter, (gpointer *) &ifindex, NULL)) { + while (g_hash_table_iter_next(&iter, (gpointer *) &pointer, NULL)) { + ifindex = GPOINTER_TO_INT(pointer); if (!g_hash_table_contains(interfaces, GINT_TO_POINTER(ifindex))) { InterfaceConfig ic;