Commands would leave use_cnt incremented, never decrementing them. This
would lead to a asserting triggering at shutdown.
Bug: #7020.
Host *host = HostGetHostFromHash(&a);
if (host) {
HostBitSet(host, idx, SCTIME_SECS(current_time) + expire);
- HostUnlock(host);
+ HostRelease(host);
json_object_set_new(answer, "message", json_string("hostbit added"));
return TM_ECODE_OK;
Host *host = HostLookupHostFromHash(&a);
if (host) {
HostBitUnset(host, idx);
- HostUnlock(host);
+ HostRelease(host);
json_object_set_new(answer, "message", json_string("hostbit removed"));
return TM_ECODE_OK;
} else {
bits[use].expire = iter->expire;
use++;
}
- HostUnlock(host);
+ HostRelease(host);
json_t *jdata = json_object();
json_t *jarray = json_array();