spv-driver: Fix memory leak on error path.