diff --git a/modules/htable/ht_api.c b/modules/htable/ht_api.c index 690f9c75e4c..fb0b11760cc 100644 --- a/modules/htable/ht_api.c +++ b/modules/htable/ht_api.c @@ -672,7 +672,10 @@ ht_cell_t* ht_cell_value_add(ht_t *ht, str *name, int val, int mode, } /* add val if htable has an integer init value */ if(ht->flags!=PV_VAL_INT) + { + if(mode) ht_slot_unlock(ht, idx); return NULL; + } isval.n = ht->initval.n + val; it = ht_cell_new(name, 0, &isval, hid); if(it == NULL)