diff --git a/src/xen/xen_inotify.c b/src/xen/xen_inotify.c index 7deb1dbe99..9e0407f011 100644 --- a/src/xen/xen_inotify.c +++ b/src/xen/xen_inotify.c @@ -463,7 +463,6 @@ xenInotifyOpen(virConnectPtr conn ATTRIBUTE_UNUSED, DEBUG0("Failed to add inotify handle, disabling events"); } - virConnectRef(conn); return 0; } @@ -486,7 +485,6 @@ xenInotifyClose(virConnectPtr conn) if (priv->inotifyWatch != -1) virEventRemoveHandle(priv->inotifyWatch); close(priv->inotifyFD); - virUnrefConnect(conn); return 0; } diff --git a/src/xen/xs_internal.c b/src/xen/xs_internal.c index 54f410f29c..0fabcf81ab 100644 --- a/src/xen/xs_internal.c +++ b/src/xen/xs_internal.c @@ -1141,8 +1141,6 @@ int xenStoreAddWatch(virConnectPtr conn, list->watches[n] = watch; list->count++; - conn->refs++; - return xs_watch(priv->xshandle, watch->path, watch->token); } @@ -1192,7 +1190,6 @@ int xenStoreRemoveWatch(virConnectPtr conn, ; /* Failure to reduce memory allocation isn't fatal */ } list->count--; - virUnrefConnect(conn); return 0; } }