aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ReedSolomon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ReedSolomon.cpp')
-rw-r--r--lib/ReedSolomon.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ReedSolomon.cpp b/lib/ReedSolomon.cpp
index 38d8ea8..1bf0b24 100644
--- a/lib/ReedSolomon.cpp
+++ b/lib/ReedSolomon.cpp
@@ -64,7 +64,9 @@ ReedSolomon::ReedSolomon(int N, int K, bool reverse, int gfpoly, int firstRoot,
ReedSolomon::~ReedSolomon()
{
- free_rs_char(rsData);
+ if (rsData != nullptr) {
+ free_rs_char(rsData);
+ }
}