gpg: Fix memory leak in the error case of signature creation.
* g10/sign.c (write_signature_packets): Free SIG. Also replace xcalloc by xtrycalloc.
If do_sign fails SIG was not released. Note that in the good case SIG
is transferred to PKT and freed by free_packet.
- Reported-by: Stephan Müller
- Signed-off-by: Werner Koch <wk@gnupg.org>