From fa1a9b5a698bbc0d282697cbc6e57f11a8ba687f Mon Sep 17 00:00:00 2001 From: Stoycho Kyosev Date: Sun, 6 Nov 2022 19:24:47 +0200 Subject: Fix mem leak --- Seminar05/LinkedList.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Seminar05/LinkedList.hpp b/Seminar05/LinkedList.hpp index fc74b21..4f12000 100644 --- a/Seminar05/LinkedList.hpp +++ b/Seminar05/LinkedList.hpp @@ -198,6 +198,7 @@ LinkedList& LinkedList::operator=(const LinkedList& other) { template LinkedList& LinkedList::operator=(LinkedList&& other) { if(this != &other) { + free(); move(other); } return *this; -- cgit v1.3.1-23-gd82d