]> git.gag.com Git - fw/openocd/blobdiff - src/target/arm11_dbgtap.c
target/arm11: fix memory leaks, including register cache
[fw/openocd] / src / target / arm11_dbgtap.c
index a758db58fc09836dcf628c7db2e63cb56f6ccf39..60be0096ff332167e0a06bc8f0e4d5f1e6d6466d 100644 (file)
@@ -1193,3 +1193,13 @@ int arm11_dpm_init(struct arm11_common *arm11, uint32_t didr)
 
        return arm11_bpwp_flush(arm11);
 }
+
+void arm11_dpm_deinit(struct arm11_common *arm11)
+{
+       struct arm_dpm *dpm = &arm11->dpm;
+
+       free(arm11->bpwp_actions);
+       arm_free_reg_cache(dpm->arm);
+       free(dpm->dbp);
+       free(dpm->dwp);
+}