From a33db8fe6f4d8a0496a723914cc33c2f76000c4e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 21 Jan 2015 22:56:20 +0100 Subject: [PATCH] config/Data: assign nullptr during iteration --- src/config/Data.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/config/Data.cxx b/src/config/Data.cxx index ae36b7f21..4aae9f7dc 100644 --- a/src/config/Data.cxx +++ b/src/config/Data.cxx @@ -24,7 +24,8 @@ void ConfigData::Clear() { - for (auto i : params) + for (auto &i : params) { delete i; - params.fill(nullptr); + i = nullptr; + } }