confile_utils: don't free netdev twice

lxc_free_netdev() will already free the list element. Fixes: https://github.com/google/oss-fuzz/pull/5498Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent baeb6dad
...@@ -465,7 +465,6 @@ bool lxc_remove_nic_by_idx(struct lxc_conf *conf, unsigned int idx) ...@@ -465,7 +465,6 @@ bool lxc_remove_nic_by_idx(struct lxc_conf *conf, unsigned int idx)
continue; continue;
lxc_list_del(cur); lxc_list_del(cur);
free(cur);
return true; return true;
} }
...@@ -480,7 +479,6 @@ void lxc_free_networks(struct lxc_list *networks) ...@@ -480,7 +479,6 @@ void lxc_free_networks(struct lxc_list *networks)
struct lxc_netdev *netdev = cur->elem; struct lxc_netdev *netdev = cur->elem;
netdev = cur->elem; netdev = cur->elem;
lxc_free_netdev(netdev); lxc_free_netdev(netdev);
free(cur);
} }
/* prevent segfaults */ /* prevent segfaults */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment