From 8f0909b7ae431a0c4a8e5b49ed4348624fdfe11e Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Thu, 4 Jul 2024 01:13:04 +0200 Subject: Fix ASan new-delete-type-mismatch error With the adreess sanitizer enabled there was an error: AddressSanitizer: new-delete-type-mismatch Caused by a size mismatch in the delete operator as the called destructor was the incorrect one. --- lout/container.hh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'lout/container.hh') diff --git a/lout/container.hh b/lout/container.hh index 3051970e..5bddbe63 100644 --- a/lout/container.hh +++ b/lout/container.hh @@ -1,3 +1,23 @@ +/* + * Dillo Widget + * + * Copyright 2005-2007 Sebastian Geerken + * Copyright 2024 Rodrigo Arias Mallo + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #ifndef __LOUT_CONTAINER_HH_ #define __LOUT_CONTAINER_HH_ @@ -231,6 +251,7 @@ protected: { object::Object *object; Node *next; + virtual ~Node() = default; }; Node **table; -- cgit v1.2.3