From 25b4d5dbbdde74910eabaee115d4bea5ee9da00b Mon Sep 17 00:00:00 2001 From: pancake Date: Thu, 31 Oct 2024 08:36:46 +0100 Subject: [PATCH] Fix recently introduced memleak and update latest numvars list --- libr/core/canal.c | 7 +++++-- libr/core/cmd_help.inc.c | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/libr/core/canal.c b/libr/core/canal.c index a47965573a..3da434252b 100644 --- a/libr/core/canal.c +++ b/libr/core/canal.c @@ -3165,17 +3165,20 @@ static char *filename(RCore *core, ut64 addr) { } static bool is_recursive(RCore *core, RAnalFunction *fcn) { + bool res = false; RVecAnalRef *refs = r_core_anal_fcn_get_calls (core, fcn); if (refs && !RVecAnalRef_empty (refs)) { RAnalRef *refi; ut64 at = fcn->addr; R_VEC_FOREACH (refs, refi) { if (at == refi->addr) { - return true; + res = true; + break; } } } - return false; + RVecAnalRef_free (refs); + return res; } static int fcn_print_json(RCore *core, RAnalFunction *fcn, bool dorefs, PJ *pj) { diff --git a/libr/core/cmd_help.inc.c b/libr/core/cmd_help.inc.c index 69cab9e053..19fa115a5f 100644 --- a/libr/core/cmd_help.inc.c +++ b/libr/core/cmd_help.inc.c @@ -1168,7 +1168,8 @@ static int cmd_help(void *data, const char *input) { const char *vars[] = { "$$", "$$c", "$$$", "$$$c", "$?", "$B", "$b", "$c", "$Cn", "$D", "$DB", "$DD", "$Dn", "$is", "$ij", "$if", "$ir", "$iv", "$in", "$ip", - "$e", "$f", "$F", "$Fb", "$FB", "$Fe", "$FE", "$Ff", "$Fi", "$FI", "$Fj", + "$f", "$fs", "$fd", "$fe", + "$e", "$F", "$Fb", "$FB", "$Fe", "$FE", "$Ff", "$Fi", "$FI", "$Fj", "$fl", "$FS", "$Fs", "$FSS", "$Ja", "$M", "$MM", "$o", "$p", "$P", "$s", "$S", "$SS", "$w", "$Xn", NULL };