Calling the function after each added nested attribute is harmless but
pointless.
Fixes: a66b5ad9540dd ("src: allow for updating devices on existing netdev chain")
Signed-off-by: Phil Sutter <phil@nwl.cc>
for (i = 0; i < num_devs; i++) {
cmd_add_loc(cmd, nlh, dev_array[i].location);
mnl_attr_put_strz(nlh, NFTA_DEVICE_NAME, dev_array[i].ifname);
- mnl_attr_nest_end(nlh, nest_dev);
}
+ mnl_attr_nest_end(nlh, nest_dev);
}
nft_dev_array_free(dev_array);
}