diff --git a/libr/core/cmd_anal.c b/libr/core/cmd_anal.c index 7b32becbb0..401fd46971 100644 --- a/libr/core/cmd_anal.c +++ b/libr/core/cmd_anal.c @@ -1431,6 +1431,7 @@ static void cmd_anal_esil(RCore *core, const char *input) { break; case '?': cmd_esil_stack (core, "?"); + break; case 0: r_anal_esil_free (esil); // reinitialize diff --git a/libr/core/cmd_write.c b/libr/core/cmd_write.c index eacce7cfad..dede1c533d 100644 --- a/libr/core/cmd_write.c +++ b/libr/core/cmd_write.c @@ -415,7 +415,6 @@ static int cmd_write(void *data, const char *input) { //if (!r_config_get_i (core->config, "io.cache")) // eprintf ("[warning] e io.cache must be true\n"); r_io_cache_list (core->io, R_FALSE); - free (ostr); break; } break; @@ -709,7 +708,7 @@ static int cmd_write(void *data, const char *input) { "Usage: 'woe from-to step'\n"); else r_cons_printf ( "Usage: 'wo%c 00 11 22'\n", input[1]); - free (ostr); + R_FREE (ostr); return 0; } case '2': @@ -838,11 +837,11 @@ static int cmd_write(void *data, const char *input) { "wt"," file [sz]","write to file (from current seek, blocksize or sz bytes)", NULL }; - r_core_cmd_help(core, help_msg); + r_core_cmd_help (core, help_msg); } break; } - free (ostr); + R_FREE (ostr); return 0; } diff --git a/libr/core/rtr.c b/libr/core/rtr.c index 055f271b78..1fd97c4505 100644 --- a/libr/core/rtr.c +++ b/libr/core/rtr.c @@ -882,8 +882,9 @@ R_API void r_core_rtr_add(RCore *core, const char *_input) { for (;;) { r_line_set_prompt (prompt2); res = r_line_readline (); - if (!res || !*res || !strcmp (res, "exit")) + if (!res || !*res || !strcmp (res, "exit")) { break; + } ptr = r_str_uri_encode (res); snprintf (uri, sizeof (uri), "http://%s:%s/%s!%s", @@ -898,6 +899,7 @@ R_API void r_core_rtr_add(RCore *core, const char *_input) { r_line_hist_add (str); free (str); } + free (ptr); } } else if (str[0]=='V') { if (str[1]==' ') { diff --git a/libr/core/vmenus.c b/libr/core/vmenus.c index ad561848ed..53a49b8368 100644 --- a/libr/core/vmenus.c +++ b/libr/core/vmenus.c @@ -693,6 +693,7 @@ R_API void r_core_visual_mounts (RCore *core) { file = r_list_get_n (list, dir); if (file && file->type != 'd') r_core_cmdf (core, "px @ 0x%"PFMT64x"!64", file->off); + r_list_free (list); *str='\0'; } r_cons_flush (); @@ -744,6 +745,7 @@ R_API void r_core_visual_mounts (RCore *core) { r_cons_flush (); r_cons_any_key (); } + r_list_free (list); } else if (mode == 2){ r_str_chop_path (path); strncat (path, "/", sizeof (path)-strlen (path)-1); diff --git a/libr/fs/fs.c b/libr/fs/fs.c index 54ca36e364..17e8c181ac 100644 --- a/libr/fs/fs.c +++ b/libr/fs/fs.c @@ -471,6 +471,7 @@ R_API RList *r_fs_partitions (RFS *fs, const char *ptype, ut64 delta) { gpt->iterate (disk, (void*)partitions[i].iterate, list); } + grubfs_free (disk); #endif } else { RFSPartitionIterator iterate = partitions[i].ptr; diff --git a/libr/io/desc.c b/libr/io/desc.c index f9cccf8663..901e2df0fd 100644 --- a/libr/io/desc.c +++ b/libr/io/desc.c @@ -194,15 +194,9 @@ R_API void r_io_desc_list_visual(RIO *io, ut64 seek, ut64 len, int width, int us io->printf ("#"); else io->printf ("-"); } - if (io->va) { - io->printf ("| %s0x%08"PFMT64x"%s %s %d\n", - color, s->to, color_end, - r_str_rwx_i (s->flags), s->fd); - } else { - io->printf ("| %s0x%08"PFMT64x"%s %s %d\n", - color, s->to, color_end, - r_str_rwx_i (s->flags), s->fd); - } + io->printf ("| %s0x%08"PFMT64x"%s %s %d\n", + color, s->to, color_end, + r_str_rwx_i (s->flags), s->fd); i++; } /* current seek */