Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/util/virnetdevopenvswitch.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitch.c
index d16af72bdf..6c4e817941 100644
--- a/src/util/virnetdevopenvswitch.c
+++ b/src/util/virnetdevopenvswitch.c
@@ -72,7 +72,7 @@ virNetDevOpenvswitchConstructVlans(virCommandPtr cmd, const
virNetDevVlan *virtV
{
int ret = -1;
size_t i = 0;
- virBuffer buf = VIR_BUFFER_INITIALIZER;
+ g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
if (!virtVlan || !virtVlan->nTags)
return 0;
@@ -113,7 +113,6 @@ virNetDevOpenvswitchConstructVlans(virCommandPtr cmd, const
virNetDevVlan *virtV
}
ret = 0;
- virBufferFreeAndReset(&buf);
return ret;
}
--
2.26.2