[wallet] Fix leak in CDB constructor