This previous commit introduced a simpler free callback for
hash data with only 1 arg, the value to free:
commit 49288fac965f0ee23db45d83ae4ef3a9a71dafd0
Author: Peter Krempa <pkrempa(a)redhat.com>
Date: Wed Oct 9 15:26:37 2019 +0200
util: hash: Add possibility to use simpler data free function in virHash
It missed two functions in the hash table code which need
to call the alternate data free function, virHashRemoveEntry
and virHashRemoveSet.
After the previous patch though, there is no code that
makes functional use of the 2nd key arg in the data
free function. There is merely one log message that can
be dropped.
We can thus purge the current virHashDataFree callback
entirely, and rename virHashDataFreeSimple to replace
it.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/conf/domain_addr.c | 4 ++--
src/conf/nwfilter_params.c | 2 +-
src/conf/virchrdev.c | 4 ++--
src/conf/virdomainmomentobjlist.c | 3 +--
src/conf/virnetworkobj.c | 2 +-
src/libxl/libxl_logger.c | 2 +-
src/locking/lock_daemon.c | 3 +--
src/nwfilter/nwfilter_dhcpsnoop.c | 4 ++--
src/nwfilter/nwfilter_learnipaddr.c | 2 +-
src/qemu/qemu_block.c | 3 +--
src/qemu/qemu_conf.c | 4 ++--
src/qemu/qemu_conf.h | 2 +-
src/qemu/qemu_domain.c | 3 +--
src/qemu/qemu_migration.c | 3 +--
src/qemu/qemu_monitor.c | 5 ++---
src/qemu/qemu_monitor.h | 2 +-
src/qemu/qemu_monitor_json.c | 2 +-
src/util/vircgroup.c | 2 +-
src/util/virhash.c | 28 +++++++---------------------
src/util/virhash.h | 16 +++-------------
src/util/virjson.c | 3 +--
src/util/virjson.h | 2 +-
src/util/virkeyfile.c | 2 +-
src/util/virlockspace.c | 2 +-
src/util/virobject.c | 3 +--
src/util/virobject.h | 3 +--
src/util/virsystemd.c | 8 ++++----
27 files changed, 43 insertions(+), 76 deletions(-)
diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c
index 74d561cd12..165bd70f2b 100644
--- a/src/conf/domain_addr.c
+++ b/src/conf/domain_addr.c
@@ -1037,14 +1037,14 @@ virDomainPCIAddressSetExtensionAlloc(virDomainPCIAddressSetPtr
addrs,
if (VIR_ALLOC(addrs->zpciIds) < 0)
return -1;
- if (!(addrs->zpciIds->uids = virHashCreateFull(10, NULL, NULL,
+ if (!(addrs->zpciIds->uids = virHashCreateFull(10, NULL,
virZPCIAddrKeyCode,
virZPCIAddrKeyEqual,
virZPCIAddrKeyCopy,
virZPCIAddrKeyFree)))
goto error;
- if (!(addrs->zpciIds->fids = virHashCreateFull(10, NULL, NULL,
+ if (!(addrs->zpciIds->fids = virHashCreateFull(10, NULL,
virZPCIAddrKeyCode,
virZPCIAddrKeyEqual,
virZPCIAddrKeyCopy,
diff --git a/src/conf/nwfilter_params.c b/src/conf/nwfilter_params.c
index 7608d4960e..b1a2c50f27 100644
--- a/src/conf/nwfilter_params.c
+++ b/src/conf/nwfilter_params.c
@@ -619,7 +619,7 @@ virNWFilterVarCombIterGetVarValue(virNWFilterVarCombIterPtr ci,
}
static void
-hashDataFree(void *payload, const void *name G_GNUC_UNUSED)
+hashDataFree(void *payload)
{
virNWFilterVarValueFree(payload);
}
diff --git a/src/conf/virchrdev.c b/src/conf/virchrdev.c
index d5c0fdbe99..d4ca3188c5 100644
--- a/src/conf/virchrdev.c
+++ b/src/conf/virchrdev.c
@@ -212,7 +212,7 @@ typedef struct {
*
* @data Opaque data, struct holding information about the device
*/
-static void virChrdevHashEntryFree(void *data, const void *key G_GNUC_UNUSED)
+static void virChrdevHashEntryFree(void *data)
{
virChrdevHashEntry *ent = data;
@@ -455,6 +455,6 @@ int virChrdevOpen(virChrdevsPtr devs,
VIR_FREE(cbdata->path);
VIR_FREE(cbdata);
virMutexUnlock(&devs->lock);
- virChrdevHashEntryFree(ent, NULL);
+ virChrdevHashEntryFree(ent);
return -1;
}
diff --git a/src/conf/virdomainmomentobjlist.c b/src/conf/virdomainmomentobjlist.c
index ef702eb6aa..18dbd434fb 100644
--- a/src/conf/virdomainmomentobjlist.c
+++ b/src/conf/virdomainmomentobjlist.c
@@ -262,8 +262,7 @@ virDomainMomentAssignDef(virDomainMomentObjListPtr moments,
static void
-virDomainMomentObjListDataFree(void *payload,
- const void *name G_GNUC_UNUSED)
+virDomainMomentObjListDataFree(void *payload)
{
virDomainMomentObjPtr obj = payload;
diff --git a/src/conf/virnetworkobj.c b/src/conf/virnetworkobj.c
index a0daaefb74..5daf4a8cb1 100644
--- a/src/conf/virnetworkobj.c
+++ b/src/conf/virnetworkobj.c
@@ -94,7 +94,7 @@ virNetworkObjLoadAllPorts(virNetworkObjPtr net,
static void
-virNetworkObjPortFree(void *val, const void *key G_GNUC_UNUSED)
+virNetworkObjPortFree(void *val)
{
virNetworkPortDefFree(val);
}
diff --git a/src/libxl/libxl_logger.c b/src/libxl/libxl_logger.c
index a829142b2b..1581a3070c 100644
--- a/src/libxl/libxl_logger.c
+++ b/src/libxl/libxl_logger.c
@@ -47,7 +47,7 @@ struct xentoollog_logger_libvirt {
};
static void
-libxlLoggerFileFree(void *payload, const void *key G_GNUC_UNUSED)
+libxlLoggerFileFree(void *payload)
{
FILE *file = payload;
VIR_FORCE_FCLOSE(file);
diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c
index 2fa3238794..0d12a97231 100644
--- a/src/locking/lock_daemon.c
+++ b/src/locking/lock_daemon.c
@@ -139,8 +139,7 @@ virLockDaemonUnlock(virLockDaemonPtr lockd)
virMutexUnlock(&lockd->lock);
}
-static void virLockDaemonLockSpaceDataFree(void *data,
- const void *key G_GNUC_UNUSED)
+static void virLockDaemonLockSpaceDataFree(void *data)
{
virLockSpaceFree(data);
}
diff --git a/src/nwfilter/nwfilter_dhcpsnoop.c b/src/nwfilter/nwfilter_dhcpsnoop.c
index 4e77ca0d2d..9514dfd75c 100644
--- a/src/nwfilter/nwfilter_dhcpsnoop.c
+++ b/src/nwfilter/nwfilter_dhcpsnoop.c
@@ -660,7 +660,7 @@ virNWFilterSnoopReqUnlock(virNWFilterSnoopReqPtr req)
* virNWFilterSnoopReqRelease - hash table free function to kill a request
*/
static void
-virNWFilterSnoopReqRelease(void *req0, const void *name G_GNUC_UNUSED)
+virNWFilterSnoopReqRelease(void *req0)
{
virNWFilterSnoopReqPtr req = req0;
@@ -721,7 +721,7 @@ virNWFilterSnoopReqPut(virNWFilterSnoopReqPtr req)
* - if we still have a valid lease, keep the req for restarts
*/
if (virHashLookup(virNWFilterSnoopState.snoopReqs, req->ifkey) != req) {
- virNWFilterSnoopReqRelease(req, NULL);
+ virNWFilterSnoopReqRelease(req);
} else if (!req->start || req->start->timeout < time(0)) {
ignore_value(virHashRemoveEntry(virNWFilterSnoopState.snoopReqs,
req->ifkey));
diff --git a/src/nwfilter/nwfilter_learnipaddr.c b/src/nwfilter/nwfilter_learnipaddr.c
index 08ef02be7c..9b4fab7ffb 100644
--- a/src/nwfilter/nwfilter_learnipaddr.c
+++ b/src/nwfilter/nwfilter_learnipaddr.c
@@ -307,7 +307,7 @@ virNWFilterHasLearnReq(int ifindex)
static void
-freeLearnReqEntry(void *payload, const void *name G_GNUC_UNUSED)
+freeLearnReqEntry(void *payload)
{
virNWFilterIPAddrLearnReqFree(payload);
}
diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index 1140a33114..ada2c52947 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -93,8 +93,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuBlockNodeNameBackingChainData,
static void
-qemuBlockNodeNameBackingChainDataHashEntryFree(void *opaque,
- const void *name G_GNUC_UNUSED)
+qemuBlockNodeNameBackingChainDataHashEntryFree(void *opaque)
{
qemuBlockNodeNameBackingChainDataFree(opaque);
}
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 21025d0785..30637b21ac 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -1516,7 +1516,7 @@ qemuSharedDeviceEntryDomainExists(qemuSharedDeviceEntryPtr entry,
}
void
-qemuSharedDeviceEntryFree(void *payload, const void *name G_GNUC_UNUSED)
+qemuSharedDeviceEntryFree(void *payload)
{
qemuSharedDeviceEntryPtr entry = payload;
size_t i;
@@ -1566,7 +1566,7 @@ qemuSharedDeviceEntryInsert(virQEMUDriverPtr driver,
return 0;
error:
- qemuSharedDeviceEntryFree(entry, NULL);
+ qemuSharedDeviceEntryFree(entry);
return -1;
}
diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h
index 7334a440f8..95b33a1093 100644
--- a/src/qemu/qemu_conf.h
+++ b/src/qemu/qemu_conf.h
@@ -338,7 +338,7 @@ bool qemuSharedDeviceEntryDomainExists(qemuSharedDeviceEntryPtr
entry,
char *qemuGetSharedDeviceKey(const char *disk_path)
ATTRIBUTE_NONNULL(1);
-void qemuSharedDeviceEntryFree(void *payload, const void *name);
+void qemuSharedDeviceEntryFree(void *payload);
int qemuAddSharedDisk(virQEMUDriverPtr driver,
virDomainDiskDefPtr disk,
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index c4d5f08541..168e7464a9 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -2063,8 +2063,7 @@ qemuDomainSetPrivatePaths(virQEMUDriverPtr driver,
static void
-dbusVMStateHashFree(void *opaque,
- const void *name G_GNUC_UNUSED)
+dbusVMStateHashFree(void *opaque)
{
qemuDBusVMStateFree(opaque);
}
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 6b667728aa..c38bf342d7 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -5432,8 +5432,7 @@ qemuMigrationJobFinish(virQEMUDriverPtr driver, virDomainObjPtr vm)
static void
-qemuMigrationDstErrorFree(void *data,
- const void *name G_GNUC_UNUSED)
+qemuMigrationDstErrorFree(void *data)
{
virErrorPtr err = data;
virFreeError(err);
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 231387a3f3..a48305b046 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -2109,7 +2109,7 @@ qemuMonitorBlockIOStatusToError(const char *status)
static void
-qemuDomainDiskInfoFree(void *value, const void *name G_GNUC_UNUSED)
+qemuDomainDiskInfoFree(void *value)
{
struct qemuDomainDiskInfo *info = value;
@@ -2774,8 +2774,7 @@ qemuMonitorQueryRxFilter(qemuMonitorPtr mon, const char *alias,
void
-qemuMonitorChardevInfoFree(void *data,
- const void *name G_GNUC_UNUSED)
+qemuMonitorChardevInfoFree(void *data)
{
qemuMonitorChardevInfoPtr info = data;
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
index d30d075b43..a17d7200c2 100644
--- a/src/qemu/qemu_monitor.h
+++ b/src/qemu/qemu_monitor.h
@@ -882,7 +882,7 @@ struct _qemuMonitorChardevInfo {
char *ptyPath;
virDomainChrDeviceState state;
};
-void qemuMonitorChardevInfoFree(void *data, const void *name);
+void qemuMonitorChardevInfoFree(void *data);
int qemuMonitorGetChardevInfo(qemuMonitorPtr mon,
virHashTablePtr *retinfo);
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index c729450a52..4d38030179 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -2925,7 +2925,7 @@ qemuMonitorJSONBlockGetNamedNodeData(qemuMonitorPtr mon)
if (!(nodes = qemuMonitorJSONQueryNamedBlockNodes(mon)))
return NULL;
- if (!(ret = virHashNew((virHashDataFreeSimple)
qemuMonitorJSONBlockNamedNodeDataFree)))
+ if (!(ret = virHashNew((virHashDataFree) qemuMonitorJSONBlockNamedNodeDataFree)))
return NULL;
if (virJSONValueArrayForeachSteal(nodes,
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index a70ffdf748..87ed9f4565 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -2583,7 +2583,7 @@ virCgroupKillRecursive(virCgroupPtr group, int signum)
bool backendAvailable = false;
virCgroupBackendPtr *backends = virCgroupBackendGetAll();
virHashTablePtr pids = virHashCreateFull(100,
- NULL, NULL,
+ NULL,
virCgroupPidCode,
virCgroupPidEqual,
virCgroupPidCopy,
diff --git a/src/util/virhash.c b/src/util/virhash.c
index 1df7f6efca..313ca57a54 100644
--- a/src/util/virhash.c
+++ b/src/util/virhash.c
@@ -56,7 +56,6 @@ struct _virHashTable {
size_t size;
size_t nbElems;
virHashDataFree dataFree;
- virHashDataFreeSimple dataFreeSimple;
virHashKeyCode keyCode;
virHashKeyEqual keyEqual;
virHashKeyCopy keyCopy;
@@ -106,7 +105,7 @@ static void virHashStrFree(void *name)
void
-virHashValueFree(void *value, const void *name G_GNUC_UNUSED)
+virHashValueFree(void *value)
{
VIR_FREE(value);
}
@@ -134,7 +133,6 @@ virHashComputeKey(const virHashTable *table, const void *name)
*/
virHashTablePtr virHashCreateFull(ssize_t size,
virHashDataFree dataFree,
- virHashDataFreeSimple dataFreeSimple,
virHashKeyCode keyCode,
virHashKeyEqual keyEqual,
virHashKeyCopy keyCopy,
@@ -151,10 +149,7 @@ virHashTablePtr virHashCreateFull(ssize_t size,
table->seed = virRandomBits(32);
table->size = size;
table->nbElems = 0;
- if (dataFree)
- table->dataFree = dataFree;
- else
- table->dataFreeSimple = dataFreeSimple;
+ table->dataFree = dataFree;
table->keyCode = keyCode;
table->keyEqual = keyEqual;
table->keyCopy = keyCopy;
@@ -178,10 +173,9 @@ virHashTablePtr virHashCreateFull(ssize_t size,
* Returns the newly created object, or NULL if an error occurred.
*/
virHashTablePtr
-virHashNew(virHashDataFreeSimple dataFree)
+virHashNew(virHashDataFree dataFree)
{
return virHashCreateFull(32,
- NULL,
dataFree,
virHashStrCode,
virHashStrEqual,
@@ -203,7 +197,6 @@ virHashTablePtr virHashCreate(ssize_t size, virHashDataFree dataFree)
{
return virHashCreateFull(size,
dataFree,
- NULL,
virHashStrCode,
virHashStrEqual,
virHashStrCopy,
@@ -324,9 +317,7 @@ virHashFree(virHashTablePtr table)
virHashEntryPtr next = iter->next;
if (table->dataFree)
- table->dataFree(iter->payload, iter->name);
- if (table->dataFreeSimple)
- table->dataFreeSimple(iter->payload);
+ table->dataFree(iter->payload);
if (table->keyFree)
table->keyFree(iter->name);
VIR_FREE(iter);
@@ -358,9 +349,7 @@ virHashAddOrUpdateEntry(virHashTablePtr table, const void *name,
if (table->keyEqual(entry->name, name)) {
if (is_update) {
if (table->dataFree)
- table->dataFree(entry->payload, entry->name);
- if (table->dataFreeSimple)
- table->dataFreeSimple(entry->payload);
+ table->dataFree(entry->payload);
entry->payload = userdata;
return 0;
} else {
@@ -518,12 +507,9 @@ void *virHashSteal(virHashTablePtr table, const void *name)
void *data = virHashLookup(table, name);
if (data) {
virHashDataFree dataFree = table->dataFree;
- virHashDataFreeSimple dataFreeSimple = table->dataFreeSimple;
table->dataFree = NULL;
- table->dataFreeSimple = NULL;
virHashRemoveEntry(table, name);
table->dataFree = dataFree;
- table->dataFreeSimple = dataFreeSimple;
}
return data;
}
@@ -601,7 +587,7 @@ virHashRemoveEntry(virHashTablePtr table, const void *name)
for (entry = *nextptr; entry; entry = entry->next) {
if (table->keyEqual(entry->name, name)) {
if (table->dataFree)
- table->dataFree(entry->payload, entry->name);
+ table->dataFree(entry->payload);
if (table->keyFree)
table->keyFree(entry->name);
*nextptr = entry->next;
@@ -689,7 +675,7 @@ virHashRemoveSet(virHashTablePtr table,
} else {
count++;
if (table->dataFree)
- table->dataFree(entry->payload, entry->name);
+ table->dataFree(entry->payload);
if (table->keyFree)
table->keyFree(entry->name);
*nextptr = entry->next;
diff --git a/src/util/virhash.h b/src/util/virhash.h
index 8087965ee9..6318c0b3cd 100644
--- a/src/util/virhash.h
+++ b/src/util/virhash.h
@@ -25,19 +25,10 @@ typedef virHashAtomic *virHashAtomicPtr;
/**
* virHashDataFree:
* @payload: the data in the hash
- * @name: the name associated
*
* Callback to free data from a hash.
*/
-typedef void (*virHashDataFree) (void *payload, const void *name);
-/**
- * virHashDataFreeSimple:
- * @payload: the data in the hash
- * @name: the name associated
- *
- * Callback to free data from a hash.
- */
-typedef void (*virHashDataFreeSimple) (void *payload);
+typedef void (*virHashDataFree) (void *payload);
/**
* virHashIterator:
@@ -107,14 +98,13 @@ typedef void (*virHashKeyFree)(void *name);
/*
* Constructor and destructor.
*/
-virHashTablePtr virHashNew(virHashDataFreeSimple dataFree);
+virHashTablePtr virHashNew(virHashDataFree dataFree);
virHashTablePtr virHashCreate(ssize_t size,
virHashDataFree dataFree);
virHashAtomicPtr virHashAtomicNew(ssize_t size,
virHashDataFree dataFree);
virHashTablePtr virHashCreateFull(ssize_t size,
virHashDataFree dataFree,
- virHashDataFreeSimple dataFreeSimple,
virHashKeyCode keyCode,
virHashKeyEqual keyEqual,
virHashKeyCopy keyCopy,
@@ -203,6 +193,6 @@ void *virHashSearch(const virHashTable *table, virHashSearcher iter,
const void *data, void **name);
/* Convenience for when VIR_FREE(value) is sufficient as a data freer. */
-void virHashValueFree(void *value, const void *name);
+void virHashValueFree(void *value);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virHashTable, virHashFree);
diff --git a/src/util/virjson.c b/src/util/virjson.c
index 76efb17e24..c57dc11f78 100644
--- a/src/util/virjson.c
+++ b/src/util/virjson.c
@@ -425,8 +425,7 @@ virJSONValueFree(virJSONValuePtr value)
void
-virJSONValueHashFree(void *opaque,
- const void *name G_GNUC_UNUSED)
+virJSONValueHashFree(void *opaque)
{
virJSONValueFree(opaque);
}
diff --git a/src/util/virjson.h b/src/util/virjson.h
index fa8571c73b..7a6b063b17 100644
--- a/src/util/virjson.h
+++ b/src/util/virjson.h
@@ -42,7 +42,7 @@ typedef struct _virJSONValue virJSONValue;
typedef virJSONValue *virJSONValuePtr;
void virJSONValueFree(virJSONValuePtr value);
-void virJSONValueHashFree(void *opaque, const void *name);
+void virJSONValueHashFree(void *opaque);
virJSONType virJSONValueGetType(const virJSONValue *value);
diff --git a/src/util/virkeyfile.c b/src/util/virkeyfile.c
index c7e756d26a..dc7a558c6f 100644
--- a/src/util/virkeyfile.c
+++ b/src/util/virkeyfile.c
@@ -265,7 +265,7 @@ static int virKeyFileParse(virKeyFilePtr conf,
}
-static void virKeyFileEntryFree(void *payload, const void *name G_GNUC_UNUSED)
+static void virKeyFileEntryFree(void *payload)
{
virHashFree(payload);
}
diff --git a/src/util/virlockspace.c b/src/util/virlockspace.c
index b7e1b6cfda..59d47daae8 100644
--- a/src/util/virlockspace.c
+++ b/src/util/virlockspace.c
@@ -231,7 +231,7 @@ virLockSpaceResourceNew(virLockSpacePtr lockspace,
}
-static void virLockSpaceResourceDataFree(void *opaque, const void *name G_GNUC_UNUSED)
+static void virLockSpaceResourceDataFree(void *opaque)
{
virLockSpaceResourcePtr res = opaque;
virLockSpaceResourceFree(res);
diff --git a/src/util/virobject.c b/src/util/virobject.c
index 812b013e72..5af14234f2 100644
--- a/src/util/virobject.c
+++ b/src/util/virobject.c
@@ -589,8 +589,7 @@ void virObjectFreeCallback(void *opaque)
* typedef.
*/
void
-virObjectFreeHashData(void *opaque,
- const void *name G_GNUC_UNUSED)
+virObjectFreeHashData(void *opaque)
{
virObjectUnref(opaque);
}
diff --git a/src/util/virobject.h b/src/util/virobject.h
index 7cb3457021..5c4bcf4dde 100644
--- a/src/util/virobject.h
+++ b/src/util/virobject.h
@@ -123,8 +123,7 @@ void
virObjectFreeCallback(void *opaque);
void
-virObjectFreeHashData(void *opaque,
- const void *name);
+virObjectFreeHashData(void *opaque);
void *
virObjectLockableNew(virClassPtr klass)
diff --git a/src/util/virsystemd.c b/src/util/virsystemd.c
index 1f9eddf70b..2acb54d41e 100644
--- a/src/util/virsystemd.c
+++ b/src/util/virsystemd.c
@@ -619,12 +619,12 @@ int virSystemdCanHybridSleep(bool *result)
static void
-virSystemdActivationEntryFree(void *data, const void *name)
+virSystemdActivationEntryFree(void *data)
{
virSystemdActivationEntryPtr ent = data;
size_t i;
- VIR_DEBUG("Closing activation FDs for %s", (const char *)name);
+ VIR_DEBUG("Closing activation FDs");
for (i = 0; i < ent->nfds; i++) {
VIR_DEBUG("Closing activation FD %d", ent->fds[i]);
VIR_FORCE_CLOSE(ent->fds[i]);
@@ -647,7 +647,7 @@ virSystemdActivationAddFD(virSystemdActivationPtr act,
return -1;
if (VIR_ALLOC_N(ent->fds, 1) < 0) {
- virSystemdActivationEntryFree(ent, name);
+ virSystemdActivationEntryFree(ent);
return -1;
}
@@ -655,7 +655,7 @@ virSystemdActivationAddFD(virSystemdActivationPtr act,
VIR_DEBUG("Record first FD %d with name %s", fd, name);
if (virHashAddEntry(act->fds, name, ent) < 0) {
- virSystemdActivationEntryFree(ent, name);
+ virSystemdActivationEntryFree(ent);
return -1;
}
--
2.21.0