From 8e7eb6103faec73689d006a1303e1f5088f16381 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Thu, 19 Apr 2007 08:57:37 +0000 Subject: [PATCH] (crypto_select): only free peer if it was used. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20426 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/hx509/hxtool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/hx509/hxtool.c b/lib/hx509/hxtool.c index 90cfe653e..ff8109c37 100644 --- a/lib/hx509/hxtool.c +++ b/lib/hx509/hxtool.c @@ -1207,7 +1207,8 @@ crypto_select(struct crypto_select_options *opt, int argc, char **argv) free(s); free_AlgorithmIdentifier(&selected); - hx509_peer_info_free(peer); + if (peer) + hx509_peer_info_free(peer); return 0; }