gettimeofday() returning a negative value is highly unlikely,
but if it ever happens, we will exit without unlocking the mutex.
Arguably at that point we'll have bigger problems, but fix this
issue anyway.
Coverity issue: 272595
Fixes:
f05e26051c15 ("eal: add IPC asynchronous request")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
wait_for_async_messages();
if (gettimeofday(&now, NULL) < 0) {
+ pthread_mutex_unlock(&pending_requests.lock);
RTE_LOG(ERR, EAL, "Cannot get current time\n");
break;
}