From f5a3291ce74667ca80be6a81719762b8c6102edf Mon Sep 17 00:00:00 2001 From: Joachim Klein Date: Mon, 20 Nov 2017 10:59:12 +0100 Subject: [PATCH] Fix memory leak in BitVector::operator=(BitVector&& other) --- src/storm/storage/BitVector.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/storm/storage/BitVector.cpp b/src/storm/storage/BitVector.cpp index 4f54f8dd8..41d120ed9 100644 --- a/src/storm/storage/BitVector.cpp +++ b/src/storm/storage/BitVector.cpp @@ -158,6 +158,8 @@ namespace storm { // Only perform the assignment if the source and target are not identical. if (this != &other) { bitCount = other.bitCount; + if (this->buckets) + delete[] this->buckets; this->buckets = other.buckets; other.buckets = nullptr; }