This is an automated email from Gerrit.

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

-- gerrit

commit f5ab479c66f91ef08d0ebd7a50d166adaf9be5fa
Author: Tomas Vanek <[email protected]>
Date:   Fri Dec 20 23:38:42 2019 +0100

    xsvf: fix memory leak
    
    Discovered by clang static analyzer.
    
    Change-Id: I2980586aea5ee43226adb1f4cf72e7ba1dfddd83
    Signed-off-by: Tomas Vanek <[email protected]>

diff --git a/src/xsvf/xsvf.c b/src/xsvf/xsvf.c
index e574c6f..bec32f2 100644
--- a/src/xsvf/xsvf.c
+++ b/src/xsvf/xsvf.c
@@ -918,8 +918,10 @@ COMMAND_HANDLER(handle_xsvf_command)
                                        struct scan_field field;
 
                                        result = svf_add_statemove(loop_state);
-                                       if (result != ERROR_OK)
+                                       if (result != ERROR_OK) {
+                                               free(dr_in_mask);
                                                return result;
+                                       }
                                        jtag_add_clocks(loop_clocks);
                                        jtag_add_sleep(loop_usecs);
 

-- 


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

Reply via email to