db: Fix erronous allocated size

Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>