From 979756e26af57e715efe64f8de8068243fa27e9f Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Mon, 26 Feb 2018 11:09:34 +0900 Subject: Deal with memory more carefully Plugs some memory leaks reported by Valgrind. --- events/event.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'events/event.cpp') diff --git a/events/event.cpp b/events/event.cpp index b55c44c4..74a2c3d7 100644 --- a/events/event.cpp +++ b/events/event.cpp @@ -120,7 +120,8 @@ RoomEvent::RoomEvent(Type type, const QJsonObject& rep) auto redaction = unsignedData.value("redacted_because"); if (redaction.isObject()) { - _redactedBecause.reset(new RedactionEvent(redaction.toObject())); + _redactedBecause = + std::make_unique(redaction.toObject()); return; } -- cgit v1.2.3