Skip to content

Commit f5bb7fa

Browse files
committed
Fix possible null deref in anal->fcns
1 parent 94cc77e commit f5bb7fa

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

libr/anal/anal.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,10 @@ R_API void r_anal_trace_bb(RAnal *anal, ut64 addr) {
408408

409409
R_API RList* r_anal_get_fcns(RAnal *anal) {
410410
R_RETURN_VAL_IF_FAIL (anal, NULL);
411-
// avoid received to free this thing
412-
anal->fcns->free = NULL;
411+
if (anal->fcns) {
412+
// avoid received to free this thing
413+
anal->fcns->free = NULL;
414+
}
413415
return anal->fcns;
414416
}
415417

0 commit comments

Comments
 (0)