Assorted memory leak fixes on the error code paths.
These are taken from these commits:
98c52ae * card: Intialize pointer to avoid double free
fc5fac8 * kbx: Avoid uninitialized read
fa0771f * g10: Avoid memory leaks
25aa353 * dirmgr: Avoid double free
33a2362 * agent: Fix memory leaks
e6132bc * sm: Avoid memory leaks and double double-free
2af7bb2 * g10: Fix memory leaks
0d2c1e9 * dirmgr: clean up memory on error code paths
- GnuPG-bug-id: T5393
- Signed-off-by: Werner Koch <wk@gnupg.org>