]> git.ipfire.org Git - people/ms/libloc.git/commitdiff
database: Fix use-after-free error after last iteration of search
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 3 Oct 2019 18:38:14 +0000 (18:38 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 3 Oct 2019 18:38:14 +0000 (18:38 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/database.c

index f98647979d9dd8938fbd8287a1d3379226c216e3..648434565110f571461769ce8d2173a594c67d33 100644 (file)
@@ -688,6 +688,7 @@ LOC_EXPORT int loc_database_enumerator_next_as(
 
                // No match
                loc_as_unref(*as);
+               *as = NULL;
        }
 
        // Reset the index