dialplan: prevent memory corruption when DB backend fails to start

Fix a couple of incorrect free operations