From dc6b3d257ef6d53faf5730fe9d80b4fc7ed03b52 Mon Sep 17 00:00:00 2001 From: Amin Ben Ramdhane Date: Fri, 29 Mar 2019 10:21:54 +0100 Subject: [PATCH] Fix segmentation fault when removing 'Device.DNS.Relay.Forwarding.' object --- dm/dmtree/tr181/dns.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dm/dmtree/tr181/dns.c b/dm/dmtree/tr181/dns.c index e36935c..37242e0 100644 --- a/dm/dmtree/tr181/dns.c +++ b/dm/dmtree/tr181/dns.c @@ -403,11 +403,11 @@ int delete_relay_forwarding(char *refparam, struct dmctx *ctx, void *data, char switch (del_action) { case DEL_INST: - dmuci_get_value_by_section_string((struct uci_section *)data, "peerdns", str); + dmuci_get_value_by_section_string((struct uci_section *)data, "peerdns", &str); if (str[0] == '1') return 0; - dmuci_get_value_by_section_string((struct uci_section *)data, "interface", interface); - dmuci_get_value_by_section_string((struct uci_section *)data, "ip", ip); + dmuci_get_value_by_section_string((struct uci_section *)data, "interface", &interface); + dmuci_get_value_by_section_string((struct uci_section *)data, "ip", &ip); dmuci_del_list_value("network", interface, "dns", ip); dmuci_delete_by_section((struct uci_section *)data, NULL, NULL); break;