sm: Avoid double-free on iconv failure
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Fri, 19 Dec 2014 23:53:34 +0000 (18:53 -0500)
committerWerner Koch <wk@gnupg.org>
Mon, 22 Dec 2014 13:00:38 +0000 (14:00 +0100)
commited8383c618e124cfa708c9ee87563fcdf2f4649c
tree023bb9c385d6320338479825e1bde35eec724a01
parentb0b3803e8c2959dd67ca96debc54b5c6464f0d41
sm: Avoid double-free on iconv failure

* sm/minip12.c: (p12_build) if jnlib_iconv_open fails, avoid
double-free of pwbuf.

--

Observed by Joshua Rogers <honey@internot.info>, who proposed a
slightly different fix.

Debian-Bug-Id: 773472

Added fix at a second place - wk.
sm/minip12.c