From f9351f8997066036ea983381d2ee92a1fefc434f Mon Sep 17 00:00:00 2001 From: longwei Date: Fri, 23 Sep 2022 10:28:06 +0800 Subject: [PATCH] fixed a03c769 from https://gitee.com/a-carter-bear/xts_acts/pulls/5621 fix crash for zlib xts test Signed-off-by: longwei Change-Id: Ic902287c2755eaf5c0d1507690ea7c4e8a4ec8a6 --- bundlemanager/zlib/actszlibtest/ActsZlibTest.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bundlemanager/zlib/actszlibtest/ActsZlibTest.cpp b/bundlemanager/zlib/actszlibtest/ActsZlibTest.cpp index 90dfb69aa..c52fea386 100644 --- a/bundlemanager/zlib/actszlibtest/ActsZlibTest.cpp +++ b/bundlemanager/zlib/actszlibtest/ActsZlibTest.cpp @@ -1245,6 +1245,7 @@ HWTEST_F(ActsZlibTest, ActsZlibTestGzUnGetc, Function | MediumTest | Level2) file = gzopen(TESTFILE, "rb"); ASSERT_TRUE(file != NULL); ASSERT_FALSE(gzungetc(' ', file) != ' '); + gzclose(file); #endif } @@ -1264,6 +1265,7 @@ HWTEST_F(ActsZlibTest, ActsZlibTestGzVprintf, Function | MediumTest | Level2) int err = TestGzPrintf(file, ", %s!", "hello"); fprintf(stderr, "gzvprintf result: %d\n", err); + gzclose(file); #endif } -- GitLab