]> git.proxmox.com Git - mirror_lxc.git/commitdiff
network: Adds free_ovs_veth_vlan_args and allows trunks field to be freed
authorThomas Parrott <thomas.parrott@canonical.com>
Tue, 9 Jun 2020 12:02:54 +0000 (13:02 +0100)
committerThomas Parrott <thomas.parrott@canonical.com>
Tue, 9 Jun 2020 13:05:16 +0000 (14:05 +0100)
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
src/lxc/network.c

index b0e614e424b4f07ecd4f7e7b29b04d330b8dca26..f206be55bca3210f023c6eb801968993d26cb59e 100644 (file)
@@ -421,9 +421,13 @@ struct ovs_veth_vlan_args {
        const char *nic;
        const char *vlan_mode;  /* Port VLAN mode. */
        short vlan_id;          /* PVID VLAN ID. */
-       const char *trunks;     /* Comma delimited list of tagged VLAN IDs. */
+       char *trunks;           /* Comma delimited list of tagged VLAN IDs. */
 };
 
+static inline void free_ovs_veth_vlan_args(struct ovs_veth_vlan_args *args)
+{
+       free_disarm(args->trunks);
+}
 
 static int lxc_ovs_setup_bridge_vlan_exec(void *data)
 {