Coverifix

This commit is contained in:
jvoisin 2015-02-17 00:34:51 +01:00
parent e939ed0aee
commit a193e54eac
5 changed files with 18 additions and 15 deletions

View File

@ -141,6 +141,7 @@ R_API void r_cons_less_str(const char *str) {
if(rx) r_regex_free(rx);
free (lines);
free (p);
free (ms);
r_cons_set_raw (R_FALSE);
r_cons_show_cursor (R_TRUE);
}

View File

@ -57,21 +57,19 @@ static int cmd_project(void *data, const char *input) {
nl = strchr (ptr, '\n');
if (nl) {
*nl++ = 0;
if (strstr (ptr, input+2)) {
del ++;
} else {
if (strstr (ptr, input+2))
del++;
else
fprintf (fd, "%s\n", ptr);
}
}
}
free (data);
}
fclose (fd);
free (str);
if (del>0) {
if (del>0)
eprintf ("Deleted %d lines\n", del);
}
}
free (data);
fclose (fd);
free (str);
}
break;
case ' ':

View File

@ -653,6 +653,7 @@ R_API void r_core_visual_mounts (RCore *core) {
i++;
}
r_list_free (list);
list = NULL;
} else r_cons_printf ("Cannot read partition\n");
} else if (mode == 1) {
r_cons_printf ("Types:\n\n");
@ -686,6 +687,7 @@ R_API void r_core_visual_mounts (RCore *core) {
}
r_cons_printf ("\n");
r_list_free (list);
list = NULL;
} else r_cons_printf ("Cannot open '%s' directory\n", root);
} else r_cons_printf ("Root undefined\n");
}
@ -698,6 +700,7 @@ R_API void r_core_visual_mounts (RCore *core) {
if (file && file->type != 'd')
r_core_cmdf (core, "px @ 0x%"PFMT64x"!64", file->off);
r_list_free (list);
list = NULL;
*str='\0';
}
r_cons_flush ();
@ -753,6 +756,7 @@ R_API void r_core_visual_mounts (RCore *core) {
r_cons_any_key ();
}
r_list_free (list);
list = NULL;
} else if (mode == 2){
r_str_chop_path (path);
strncat (path, "/", sizeof (path)-strlen (path)-1);

View File

@ -87,7 +87,7 @@ R_API char *r_print_stereogram(const char *bump, int w, int h) {
char *out;
if (w<1 || h<1)
return NULL;
size = w * h*2;
size = w * (ut64)h * 2;
if (size>UT32_MAX) {
return NULL;
}
@ -123,12 +123,13 @@ R_API char *r_print_stereogram_bytes(const ut8 *buf, int len) {
}
bump[bumpi] = 0;
ret = r_print_stereogram (bump, cols, rows);
free (bump);
return ret;
}
R_API void r_print_stereogram_print(RPrint *p, const char *ret) {
int i;
int use_color = p? (p->flags & R_PRINT_FLAGS_COLOR): 0;
const int use_color = p->flags & R_PRINT_FLAGS_COLOR;
if (!ret) return;
if (use_color) {
for (i=0; ret[i]; i++) {

View File

@ -698,10 +698,9 @@ R_API DsoJsonObj * r_bin_java_get_import_json_definitions(RBinJavaObj *bin) {
RListIter *iter = NULL;
char *new_str;
if (!bin || !the_list)
if (!bin || !(the_list = r_bin_java_get_lib_names (bin)))
return json_list;
the_list = r_bin_java_get_lib_names (bin);
r_list_foreach ( the_list, iter, new_str) {
char *tmp = new_str;
//eprintf ("Processing string: %s\n", new_str);
@ -779,10 +778,10 @@ R_API DsoJsonObj * r_bin_java_get_interface_json_definitions(RBinJavaObj *bin) {
DsoJsonObj *json_list = dso_json_list_new ();
RListIter *iter = NULL;
char *new_str;
if (!bin || !the_list)
if (!bin || !(the_list = r_bin_java_get_interface_names (bin)))
return json_list;
the_list = r_bin_java_get_interface_names (bin);
r_list_foreach ( the_list, iter, new_str) {
char *tmp = new_str;
//eprintf ("Processing string: %s\n", new_str);