提交 6916cfd7 编写于 作者: M Matthias Bolte

datatypes: Get virSecretFreeName in sync with the other free functions

上级 a50a22df
...@@ -113,19 +113,16 @@ virStorageVolFreeName(virStorageVolPtr vol, const char *name ATTRIBUTE_UNUSED) ...@@ -113,19 +113,16 @@ virStorageVolFreeName(virStorageVolPtr vol, const char *name ATTRIBUTE_UNUSED)
/** /**
* virSecretFreeName: * virSecretFreeName:
* @secret_: a secret object * @secret: a secret object
* *
* Destroy the secret object, this is just used by the secret hash callback. * Destroy the secret object, this is just used by the secret hash callback.
* *
* Returns 0 in case of success and -1 in case of failure. * Returns 0 in case of success and -1 in case of failure.
*/ */
static void static int
virSecretFreeName(void *secret_, const char *name ATTRIBUTE_UNUSED) virSecretFreeName(virSecretPtr secret, const char *name ATTRIBUTE_UNUSED)
{ {
virSecretPtr secret; return virUnrefSecret(secret);
secret = secret_;
virUnrefSecret(secret);
} }
/** /**
...@@ -225,7 +222,7 @@ failed: ...@@ -225,7 +222,7 @@ failed:
if (ret->nodeDevices != NULL) if (ret->nodeDevices != NULL)
virHashFree(ret->nodeDevices, (virHashDeallocator) virNodeDeviceFree); virHashFree(ret->nodeDevices, (virHashDeallocator) virNodeDeviceFree);
if (ret->secrets != NULL) if (ret->secrets != NULL)
virHashFree(ret->secrets, virSecretFreeName); virHashFree(ret->secrets, (virHashDeallocator) virSecretFreeName);
if (ret->nwfilterPools != NULL) if (ret->nwfilterPools != NULL)
virHashFree(ret->nwfilterPools, (virHashDeallocator) virNWFilterPoolFreeName); virHashFree(ret->nwfilterPools, (virHashDeallocator) virNWFilterPoolFreeName);
...@@ -283,7 +280,7 @@ virReleaseConnect(virConnectPtr conn) { ...@@ -283,7 +280,7 @@ virReleaseConnect(virConnectPtr conn) {
if (conn->nodeDevices != NULL) if (conn->nodeDevices != NULL)
virHashFree(conn->nodeDevices, (virHashDeallocator) virNodeDeviceFree); virHashFree(conn->nodeDevices, (virHashDeallocator) virNodeDeviceFree);
if (conn->secrets != NULL) if (conn->secrets != NULL)
virHashFree(conn->secrets, virSecretFreeName); virHashFree(conn->secrets, (virHashDeallocator) virSecretFreeName);
if (conn->nwfilterPools != NULL) if (conn->nwfilterPools != NULL)
virHashFree(conn->nwfilterPools, (virHashDeallocator) virNWFilterPoolFreeName); virHashFree(conn->nwfilterPools, (virHashDeallocator) virNWFilterPoolFreeName);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册