mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-02 03:32:04 +00:00
Fix null deref and memleak in lang.v
This commit is contained in:
parent
a391811663
commit
5887d1ec72
@ -26,9 +26,12 @@ static const char *r2v_body = \
|
||||
"pub fn (core &R2)cmd(s string) string {\n"
|
||||
" unsafe {\n"
|
||||
" o := C.r_core_cmd_str (core, s.str)\n"
|
||||
" strs := o.vstring()\n"
|
||||
" // free(o)\n"
|
||||
" return strs\n"
|
||||
" if o != 0 {\n"
|
||||
" strs := o.vstring()\n"
|
||||
" free(o)\n"
|
||||
" return strs\n"
|
||||
" }\n"
|
||||
" return ''\n"
|
||||
" }\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
|
Loading…
x
Reference in New Issue
Block a user