From 5fd0b40ff4168993956a10df99e27e850a9b436d Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Thu, 19 Jun 2014 17:01:10 +0200 Subject: [PATCH] security: manager: Avoid forward decl of virSecurityManagerDispose --- src/security/security_manager.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/security/security_manager.c b/src/security/security_manager.c index d57bab95c6..84d90ac184 100644 --- a/src/security/security_manager.c +++ b/src/security/security_manager.c @@ -48,7 +48,17 @@ struct _virSecurityManager { static virClassPtr virSecurityManagerClass; -static void virSecurityManagerDispose(void *obj); + +static +void virSecurityManagerDispose(void *obj) +{ + virSecurityManagerPtr mgr = obj; + + if (mgr->drv->close) + mgr->drv->close(mgr); + VIR_FREE(mgr->privateData); +} + static int virSecurityManagerOnceInit(void) { @@ -231,15 +241,6 @@ void *virSecurityManagerGetPrivateData(virSecurityManagerPtr mgr) } -static void virSecurityManagerDispose(void *obj) -{ - virSecurityManagerPtr mgr = obj; - - if (mgr->drv->close) - mgr->drv->close(mgr); - VIR_FREE(mgr->privateData); -} - const char * virSecurityManagerGetDriver(virSecurityManagerPtr mgr) {