mirror of
https://github.com/radareorg/radare2.git
synced 2024-10-07 02:23:58 +00:00
Fix r2agent segfault. (#11950)
Since it s based on reference counting, it is safe to make sure the context is initialised.
This commit is contained in:
parent
11c02de20c
commit
4597224d7d
@ -97,6 +97,9 @@ int main(int argc, char **argv) {
|
||||
eprintf ("sandbox: Cannot be enabled.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
(void)r_cons_new ();
|
||||
|
||||
while (!r_cons_singleton ()->context->breaked) {
|
||||
char *result_heap = NULL;
|
||||
const char *result = page_index;
|
||||
@ -151,6 +154,7 @@ int main(int argc, char **argv) {
|
||||
free (result_heap);
|
||||
result_heap = NULL;
|
||||
}
|
||||
r_cons_free ();
|
||||
r_socket_free (s);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user