mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-28 07:30:33 +00:00
Fix UAF spotted by asan
This commit is contained in:
parent
1d41ee33e4
commit
c3310c5ae1
@ -373,11 +373,12 @@ static void recursive_help(RCore *core, int detail, const char *cmd_prefix) {
|
||||
recursive_help (core, detail, "??");
|
||||
recursive_help (core, detail, "~");
|
||||
}
|
||||
|
||||
char *s = r_core_cmd_strf (core, "%s?", cmd_prefix);
|
||||
RList *pending = r_list_newf (free);
|
||||
r_cons_print (s);
|
||||
RList *rows = r_str_split_list (s, "\n", 0);
|
||||
free (s);
|
||||
|
||||
RListIter *iter;
|
||||
char *row;
|
||||
r_list_foreach (rows, iter, row) {
|
||||
@ -400,6 +401,7 @@ static void recursive_help(RCore *core, int detail, const char *cmd_prefix) {
|
||||
}
|
||||
}
|
||||
r_list_free (rows);
|
||||
free (s);
|
||||
r_list_foreach (pending, iter, row) {
|
||||
recursive_help (core, detail, row);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user