hash: fix multiwriter lock memory allocation