mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2026-03-14 21:20:28 +01:00
tr181: dhcpv4: fix segfault on interface_get_ipv4
Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
This commit is contained in:
parent
4ebedcf707
commit
bae3028d48
1 changed files with 3 additions and 0 deletions
|
|
@ -2855,6 +2855,9 @@ static int interface_get_ipv4(const char *iface, uint32_t *addr, unsigned *bits)
|
|||
json_object *jobj;
|
||||
|
||||
jobj = dmjson_select_obj_in_array_idx(res, 0, 1, "ipv4-address");
|
||||
if (jobj == NULL)
|
||||
return -1;
|
||||
|
||||
json_object_object_foreach(jobj, key, val) {
|
||||
if (!strcmp(key, "address"))
|
||||
addr_str = json_object_get_string(val);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue