From 47f24f2a8faf71395a1d054e9823beb000442cce Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 4 Dec 2022 01:33:45 +0100 Subject: Implement rudimentary reference counting for sqfs_object_t Implement grab/drop functions to increase/decrease reference count and destroy the object if the count drops to 0. Make sure that all objects that maintain internal references actually grab that reference, duplicate it in the copy function, drop it in the destroy handler. Signed-off-by: David Oberhollenzer --- tests/libutil/str_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/libutil') diff --git a/tests/libutil/str_table.c b/tests/libutil/str_table.c index 9424581..d4160eb 100644 --- a/tests/libutil/str_table.c +++ b/tests/libutil/str_table.c @@ -30,7 +30,7 @@ static int read_strings(void) strings[i] = line; } - sqfs_destroy(fp); + sqfs_drop(fp); return 0; } -- cgit v1.2.3