From: Michael Tremer Date: Thu, 3 Oct 2019 18:38:14 +0000 (+0000) Subject: database: Fix use-after-free error after last iteration of search X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=74f218f0387e6dba3fc850df8f4f20d14ef27968;p=people%2Fsennis%2Flibloc.git database: Fix use-after-free error after last iteration of search Signed-off-by: Michael Tremer --- diff --git a/src/database.c b/src/database.c index f986479..6484345 100644 --- a/src/database.c +++ b/src/database.c @@ -688,6 +688,7 @@ LOC_EXPORT int loc_database_enumerator_next_as( // No match loc_as_unref(*as); + *as = NULL; } // Reset the index