diff --git a/libr/asm/p/asm_arm_as.c b/libr/asm/p/asm_arm_as.c index c9834862c5..bec1523df7 100644 --- a/libr/asm/p/asm_arm_as.c +++ b/libr/asm/p/asm_arm_as.c @@ -55,6 +55,9 @@ static int assemble(RAsm *a, RAsmOp *op, const char *buf) { (void)close (ifd); free (asm_buf); if (!success) { + free (as); + free (ipath); + free (opath); return -1; } } diff --git a/libr/core/core.c b/libr/core/core.c index 7c20dbac82..30d255c4dc 100644 --- a/libr/core/core.c +++ b/libr/core/core.c @@ -3459,6 +3459,7 @@ R_API char *r_core_editor(const RCore *core, const char *file, const char *str) const size_t str_len = strlen (str); if (write (fd, str, str_len) != str_len) { close (fd); + free (name); return NULL; } } diff --git a/libr/main/radare2.c b/libr/main/radare2.c index b91f234d6e..1415c4f71e 100644 --- a/libr/main/radare2.c +++ b/libr/main/radare2.c @@ -408,6 +408,7 @@ R_API int r_main_radare2(int argc, const char **argv) { r = r_core_new (); if (!r) { eprintf ("Cannot initialize RCore\n"); + LISTS_FREE (); return 1; } r->r_main_radare2 = r_main_radare2;