scd: Avoid double-free on error condition in scd
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Fri, 19 Dec 2014 23:07:55 +0000 (18:07 -0500)
committerWerner Koch <wk@gnupg.org>
Mon, 22 Dec 2014 12:17:50 +0000 (13:17 +0100)
commitb0b3803e8c2959dd67ca96debc54b5c6464f0d41
tree0eef02d3642e1519f7bc365268430bd255d77843
parent367b073ab5f439ccf0750461d10c69f36998bd62
scd: Avoid double-free on error condition in scd

* scd/command.c (cmd_readkey): avoid double-free of cert

--

When ksba_cert_new() fails, cert will be double-freed.

Debian-Bug-Id: 773471

Original patch changed by wk to do the free only at leave.
scd/command.c