summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libvir.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libvir.c b/libvir.c
index cdc5b51..e210597 100644
--- a/libvir.c
+++ b/libvir.c
@@ -1653,6 +1653,7 @@ libvirt_virConnectDomainEventCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
LIBVIRT_ENSURE_THREAD_STATE;
/* Create a python instance of this virDomainPtr */
+ virDomainRef(dom);
pyobj_dom = libvirt_virDomainPtrWrap(dom);
pyobj_dom_args = PyTuple_New(2);
if(PyTuple_SetItem(pyobj_dom_args, 0, pyobj_conn_inst)!=0) {