From: Matt Coleman Date: Thu, 21 Jan 2021 18:50:47 +0000 (-0500) Subject: hyperv: enable automatic cleanup for OpenWSMAN types X-Git-Tag: v7.1.0-rc1~494 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c34b298db5db694f02b6066302662dc7caa8a5b;p=thirdparty%2Flibvirt.git hyperv: enable automatic cleanup for OpenWSMAN types Signed-off-by: Matt Coleman Reviewed-by: Laine Stump --- diff --git a/src/hyperv/hyperv_private.h b/src/hyperv/hyperv_private.h index 58abad61a4..a8855e8118 100644 --- a/src/hyperv/hyperv_private.h +++ b/src/hyperv/hyperv_private.h @@ -22,11 +22,10 @@ #pragma once -#include - #include "internal.h" #include "virerror.h" #include "hyperv_util.h" +#include "hyperv_wsman.h" #include "capabilities.h" #include "domain_conf.h" diff --git a/src/hyperv/hyperv_wsman.h b/src/hyperv/hyperv_wsman.h new file mode 100644 index 0000000000..c69619d2c1 --- /dev/null +++ b/src/hyperv/hyperv_wsman.h @@ -0,0 +1,28 @@ +/* + * hyperv_wsman.h: OpenWSMAN include and GLib auto-cleanup + * + * Copyright (C) 2021 Datto Inc + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * . + * + */ + +#pragma once + +#include + +G_DEFINE_AUTO_CLEANUP_FREE_FUNC(WsXmlDocH, ws_xml_destroy_doc, NULL); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(client_opt_t, wsmc_options_destroy); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(filter_t, filter_destroy);