fix a bunch of memleaks

This commit is contained in:
Jeffrey Crowell 2015-11-01 00:47:16 -04:00
parent 40b5111c3c
commit 20d1886a5a
3 changed files with 7 additions and 0 deletions

View File

@ -222,6 +222,7 @@ R_API char *r_bin_demangle_objc(RBinFile *binfile, const char *sym) {
}
}
if (sym[0] == '_' && sym[2] == '_') { // gnu style
free (clas);
clas = strdup (sym + 3);
args = strstr (clas, "__");
if (!args) {

View File

@ -153,6 +153,10 @@ R_API int r_cons_less_str(const char *str, const char *exitkeys) {
printpage (p, lines, mla, from, to, w);
ch = r_cons_readchar ();
if (exitkeys && strchr (exitkeys, ch)) {
for (i = 0; i < lines_count; i++) {
r_list_free(mla[i]);
}
free (mla);
return ch;
}
ch = r_cons_arrow_to_hjkl (ch);

View File

@ -522,6 +522,8 @@ R_API int r_run_config_env(RRunProfile *p) {
}
}
}
r_socket_free (child);
r_socket_free (fd);
}
if (p->_r2sleep != 0) {
r_sys_sleep (p->_r2sleep);