Fix database locking calling db_lock and returning from function without calling db_unlock.
Fix database locking calling db_lock and returning from function without calling db_unlock.

rkorzeniewski/bacula,rkorzeniewski/bacula,rkorzeniewski/bacula,rkorzeniewski/bacula,rkorzeniewski/bacula,rkorzeniewski/bacula,rkorzeniewski/bacula,rkorzeniewski/bacula