From 6c6c47df8d9e95f1cedccecd40a66d66e18a5dd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnim=20L=C3=A4uger?= Date: Sun, 8 Mar 2009 15:39:29 +0000 Subject: [PATCH] avoid double free for SIR/SDR parameter strings in case of a consistency check error git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1454 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- jtag/ChangeLog | 3 +++ jtag/src/svf/svf.c | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/jtag/ChangeLog b/jtag/ChangeLog index 98d261f7..64135dfd 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,5 +1,8 @@ 2009-03-08 Arnim Laeuger + * src/svf/svf.c: avoid double free for SIR/SDR parameter strings in case + of a consistency check error + * src/bsdl/bsdl_sem.c: avoid leading space when printing commands 2009-03-07 Arnim Laeuger diff --git a/jtag/src/svf/svf.c b/jtag/src/svf/svf.c index c1cf4593..7137846d 100644 --- a/jtag/src/svf/svf.c +++ b/jtag/src/svf/svf.c @@ -824,15 +824,15 @@ svf_sxr(chain_t *chain, parser_priv_t *priv, enum generic_irdr_coding ir_dr, sxr_params->no_tdi = 0; } - /* result of consistency check */ - if (!result) - return(0); - /* take over responsability for free'ing parameter strings */ params->tdi = NULL; params->mask = NULL; params->smask = NULL; + /* result of consistency check */ + if (!result) + return(0); + /* * handle tap registers