From ba7598f5591465e4d73dccfc5f20cb16e04c4360 Mon Sep 17 00:00:00 2001 From: Shchelkunov Artem Date: Fri, 20 Aug 2021 18:06:12 +0500 Subject: [PATCH] Fix: passed to proc after free Found by static analyzer svace Static analyzer message: Pointer 'dp' is passed to a function at iter_hints.c:401 after the referenced memory was deallocated at iter_hints.c:174 by passing as 3rd parameter to function 'hints_insert' at iter_hints.c:398. on-behalf-of: @ideco-team --- iterator/iter_hints.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iterator/iter_hints.c b/iterator/iter_hints.c index 2af443d8c..5819cfb17 100644 --- a/iterator/iter_hints.c +++ b/iterator/iter_hints.c @@ -397,10 +397,10 @@ read_root_hints(struct iter_hints* hints, char* fname) delegpt_free_mlc(dp); return 1; } + delegpt_log(VERB_QUERY, dp); if(!hints_insert(hints, c, dp, 0)) { return 0; } - delegpt_log(VERB_QUERY, dp); return 1; stop_read: -- 2.39.5