Fix memleak

This commit is contained in:
pancake 2017-04-09 18:57:33 +02:00
parent 1ef940c92d
commit 870bb924da
2 changed files with 3 additions and 1 deletions

View File

@ -1112,8 +1112,9 @@ int main(int argc, char **argv, char **envp) {
char *s = r_core_cmd_str (&r, "ieq");
if (s && *s) {
int da = r_config_get_i (r.config, "file.analyze");
if (da > do_analysis)
if (da > do_analysis) {
do_analysis = da;
}
}
free (s);
}

View File

@ -755,6 +755,7 @@ static void ds_build_op_str(RDisasmState *ds) {
free (ds->opstr);
ds->opstr = strdup (ds->str);
} else {
free (ds->opstr);
ds->opstr = strdup (asm_str? asm_str: "");
}
}