This is an automated email from Gerrit.

Mikhail Rasputin ([email protected]) just uploaded a new patch 
set to Gerrit, which you can find at http://openocd.zylin.com/5724

-- gerrit

commit 8454ff11236a74ebfb374c2e726805f7ce53a952
Author: Mikhail Rasputin <[email protected]>
Date:   Wed Jun 24 19:21:31 2020 +0300

    jtag/tcl: remove incorrect Jim_FreeNewObj() call
    
    It leads to the double release and breaks the memory heap, because the
    Jim_SetResultFormatted() freed the 'Jim_Obj' earlier.
    
    Change-Id: Ifa5f38009b2d617624b5f27e916720888a3dbad9
    Signed-off-by: Mikhail Rasputin <[email protected]>

diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c
index d2f1f0d..b684821 100644
--- a/src/jtag/tcl.c
+++ b/src/jtag/tcl.c
@@ -690,7 +690,6 @@ static int jim_jtag_arp_init(Jim_Interp *interp, int argc, 
Jim_Obj *const *argv)
        if (e != ERROR_OK) {
                Jim_Obj *eObj = Jim_NewIntObj(goi.interp, e);
                Jim_SetResultFormatted(goi.interp, "error: %#s", eObj);
-               Jim_FreeNewObj(goi.interp, eObj);
                return JIM_ERR;
        }
        return JIM_OK;
@@ -714,7 +713,6 @@ static int jim_jtag_arp_init_reset(Jim_Interp *interp, int 
argc, Jim_Obj *const
        if (e != ERROR_OK) {
                Jim_Obj *eObj = Jim_NewIntObj(goi.interp, e);
                Jim_SetResultFormatted(goi.interp, "error: %#s", eObj);
-               Jim_FreeNewObj(goi.interp, eObj);
                return JIM_ERR;
        }
        return JIM_OK;

-- 


_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to