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; }