fix some error path leaks
don't set CAPATH to /

it'll try to read some files from there
fix sxi_set_operation leak