[sr-dev] git:master: modules_k/pua: Fixed memory leak and added checks for NULL results being returned from database queries