From 57da17d65db6a0f39ea3c723f318aade554ecf16 Mon Sep 17 00:00:00 2001 From: Jonathan Means Date: Tue, 3 Mar 2020 09:00:50 -0500 Subject: [PATCH] Fix resource leak --- modules/c/nitf/source/Reader.c | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/c/nitf/source/Reader.c b/modules/c/nitf/source/Reader.c index 313142e3d..b8033aeeb 100644 --- a/modules/c/nitf/source/Reader.c +++ b/modules/c/nitf/source/Reader.c @@ -2097,6 +2097,7 @@ NITFAPI(nitf_Version) nitf_Reader_getNITFVersion(const char* fileName) if (io) { version = nitf_Reader_getNITFVersionIO(io); + nitf_IOInterface_close(io, &error); nitf_IOInterface_destruct(&io); }