Fix errors reported by static code analyser
This fixes some errors reported by static code analyser:
- Possible memory leak in examples/samplesftp.c and in tests/unittests/torture_pki_dsa.c
- Adds null checks in tests:
- torture_config.c
- torture_options.c
- torture_pki_dsa.c
- torture_pki_ecdsa.c
- torture_pki_ed25519.c
- torture_pki_rsa.c
- torture_threads_pki_rsa.c
Edited by Anderson Sasaki