The selinux headers have a 'typedef context_s_t *context_t;' definition
in the header so we declare autoptr cleanup function for 'context_s_t'
and use it instead of 'context_t' definitions.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
#define MAX_CONTEXT 1024
+/* selinux headers define 'context_t' as pointer to 'context_s_t' */
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(context_s_t, context_free);
+
typedef struct _virSecuritySELinuxData virSecuritySELinuxData;
struct _virSecuritySELinuxData {
char *domain_context;