malloc: fix not unlocking hotplug on fail to init

We lock the hotplug during init, but do not unlock it if we couldn't
register multiprocess callbacks. Add the missing unlock.

Fixes: 07dcbfe0101f ("malloc: support multiprocess memory hotplug")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
This commit is contained in:
Anatoly Burakov 2018-04-13 16:58:39 +01:00 committed by Thomas Monjalon
parent 48e9728898
commit 079527f069

View File

@ -815,6 +815,7 @@ rte_eal_malloc_heap_init(void)
if (register_mp_requests()) {
RTE_LOG(ERR, EAL, "Couldn't register malloc multiprocess actions\n");
rte_rwlock_read_unlock(&mcfg->memory_hotplug_lock);
return -1;
}