From c7995ff59cde983ab33eee632020d5a9146aa1b5 Mon Sep 17 00:00:00 2001 From: Marcel Telka Date: Sun, 16 Feb 2003 20:44:50 +0000 Subject: [PATCH] 2003-02-16 Marcel Telka MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * src/jtag.c (main): Fixed segfault in 'detectflash'. Thanks to August Hörandl for reporting this issue. git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@357 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- jtag/ChangeLog | 5 +++++ jtag/NEWS | 1 + jtag/src/jtag.c | 5 ++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/jtag/ChangeLog b/jtag/ChangeLog index f125f02a..881c8e73 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,3 +1,8 @@ +2003-02-16 Marcel Telka + + * src/jtag.c (main): Fixed segfault in 'detectflash'. Thanks to August Hörandl + for reporting this issue. + 2003-02-16 Marcel Telka * src/Makefile.am (jtag_SOURCES): Added new flash files with flash driver diff --git a/jtag/NEWS b/jtag/NEWS index eff4ab1a..a77ba56e 100644 --- a/jtag/NEWS +++ b/jtag/NEWS @@ -14,6 +14,7 @@ $Id$ * Added command history load/save support (August Hörandl). * Added support for flash drivers (August Hörandl). * Added flash driver for AMD chips (August Hörandl). + * Some bugs fixed. jtag-0.2.2 (2003-02-04): diff --git a/jtag/src/jtag.c b/jtag/src/jtag.c index b4ca05db..d1120705 100644 --- a/jtag/src/jtag.c +++ b/jtag/src/jtag.c @@ -229,8 +229,11 @@ main( void ) parts_free( ps ); ps = detect_parts( JTAG_DATA_DIR ); - if (!ps->len) + if (!ps->len) { + parts_free( ps ); + ps = NULL; continue; + } parts_set_instruction( ps, "SAMPLE/PRELOAD" ); parts_shift_instructions( ps ); parts_shift_data_registers( ps );