Fix memory leaks on db_error by removing hard exit.
Merge pull request #92 from stef145g/master

Fix memory leaks on db_error by removing hard exit.