From ac3b1dda63944f2cc8caaa52344774255e1956c8 Mon Sep 17 00:00:00 2001 From: yzrh Date: Thu, 22 Dec 2022 11:22:41 +0000 Subject: Fix memory leak and data type. Signed-off-by: yzrh --- src/pdf_get.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pdf_get.c') diff --git a/src/pdf_get.c b/src/pdf_get.c index f72f4aa..4e1ec56 100644 --- a/src/pdf_get.c +++ b/src/pdf_get.c @@ -136,7 +136,7 @@ pdf_get_free_ids(pdf_object_t **pdf, int **ids, int count) if (i != id) { (*ids)[pos] = i; - if (pos == count) + if (pos == count - 1) return 0; pos++; -- cgit v1.2.3