X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Frtos%2FeCos.c;h=7310d6d64039be212284fe18f50a77488ac1a3b3;hp=f2c7f712688eb84eb779221f1d546124fba459b5;hb=d36889e692788d4dc4acabd073d57f4a178e3172;hpb=b7d2cdc0d4fc319169c60362708a67e2ff626525 diff --git a/src/rtos/eCos.c b/src/rtos/eCos.c index f2c7f71268..7310d6d640 100644 --- a/src/rtos/eCos.c +++ b/src/rtos/eCos.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * ***************************************************************************/ #ifdef HAVE_CONFIG_H @@ -125,25 +125,7 @@ static int eCos_update_threads(struct rtos *rtos) } /* wipe out previous thread details if any */ - if (rtos->thread_details != NULL) { - int j; - for (j = 0; j < rtos->thread_count; j++) { - if (rtos->thread_details[j].display_str != NULL) { - free(rtos->thread_details[j].display_str); - rtos->thread_details[j].display_str = NULL; - } - if (rtos->thread_details[j].thread_name_str != NULL) { - free(rtos->thread_details[j].thread_name_str); - rtos->thread_details[j].thread_name_str = NULL; - } - if (rtos->thread_details[j].extra_info_str != NULL) { - free(rtos->thread_details[j].extra_info_str); - rtos->thread_details[j].extra_info_str = NULL; - } - } - free(rtos->thread_details); - rtos->thread_details = NULL; - } + rtos_free_threadlist(rtos); /* determine the number of current threads */ uint32_t thread_list_head = rtos->symbols[eCos_VAL_thread_list].address;