Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/miloyip/rapidjson.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Briden <tom@decompile.me.uk>2022-05-15 12:20:21 +0300
committerMilo Yip <miloyip@gmail.com>2022-05-16 05:23:11 +0300
commit2b2c80450031028439ba2a17a09ef5aa10f2159b (patch)
treefa311ad1c58cae0576e4e79994fbf04f3451b258
parent1f59c69cd18cd508395fe0bb5c2f8ee909e3c48d (diff)
encdedstreamtest: fix use-after-free compile error with gcc-12
-rw-r--r--test/unittest/encodedstreamtest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/unittest/encodedstreamtest.cpp b/test/unittest/encodedstreamtest.cpp
index d9b87e94..1f0f0e76 100644
--- a/test/unittest/encodedstreamtest.cpp
+++ b/test/unittest/encodedstreamtest.cpp
@@ -113,8 +113,8 @@ protected:
EXPECT_EQ(expected, actual);
}
EXPECT_EQ('\0', s.Peek());
- free(data);
EXPECT_EQ(size, eis.Tell());
+ free(data);
}
}