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)
committerNIIBE Yutaka <gniibe@fsij.org>
Tue, 13 Jan 2015 01:52:22 +0000 (10:52 +0900)
commit0fd4cd8503dfe9c3e6a362003bd647b4cd882363
treee1356dc0cabbaa0d98c25c71d6531fd57d087463
parent1fc4dc541af7d4bf4dba6ef37d1d7841498a05c6
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