fix segfault while connecting to a new cable after probing a flash

http://blackfin.uclinux.org/gf/tracker/6028

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1790 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Mike Frysinger 15 years ago
parent fab3d1d502
commit 8e3076a4be

@ -2,6 +2,14 @@
* src/bus/s3c4510x.c: Punt dead/useless cvs log info.
* src/tap/cable.c (urj_tap_cable_create): Call urj_bus_buses_delete() rather
than manipulate urj_bus directly so the urj_buses structure doesn't get
corrupted. Otherwise we segfault when changing cables after initializing a
bus: cable probe; detect; initbus ...; detectflash ...; cable probe; detect
* src/apps/jtag/jtag.c (cleanup): Call urj_bus_buses_free() to clean up all
buses and not just the active one.
http://blackfin.uclinux.org/gf/tracker/6028
2010-06-14 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Drop stropts.h check since parport code no longer uses it.

@ -339,12 +339,7 @@ static void
cleanup (urj_chain_t *chain)
{
urj_flash_cleanup ();
if (urj_bus)
{
URJ_BUS_FREE (urj_bus);
urj_bus = NULL;
}
urj_bus_buses_free ();
urj_tap_chain_free (chain);
chain = NULL;
}

@ -539,10 +539,7 @@ urj_tap_cable_create (urj_chain_t *chain, const urj_cable_driver_t *driver)
urj_cable_t *cable;
if (urj_bus)
{
URJ_BUS_FREE (urj_bus);
urj_bus = NULL;
}
urj_bus_buses_delete (urj_bus);
urj_tap_chain_disconnect (chain);

Loading…
Cancel
Save