diff --git a/src/conf/virnwfilterbindingobj.c b/src/conf/virnwfilterbindingobj.c index acea240b5d..d387af68c0 100644 --- a/src/conf/virnwfilterbindingobj.c +++ b/src/conf/virnwfilterbindingobj.c @@ -57,10 +57,15 @@ VIR_ONCE_GLOBAL_INIT(virNWFilterBindingObj); virNWFilterBindingObj * virNWFilterBindingObjNew(void) { + virNWFilterBindingObj *ret; if (virNWFilterBindingObjInitialize() < 0) return NULL; - return virObjectNew(virNWFilterBindingObjClass); + if (!(ret = virObjectLockableNew(virNWFilterBindingObjClass))) + return NULL; + + virObjectLock(ret); + return ret; }