From c8b6ca9070a7e0ed0826e86b3948af57ce7aeaa2 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 22 Mar 2016 10:01:59 +0100 Subject: qthelper: fix potential NULL deref in error path Found by clang-tidy. --- libmpv/qthelper.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libmpv') diff --git a/libmpv/qthelper.hpp b/libmpv/qthelper.hpp index c25315f3b4..70b3baffc4 100644 --- a/libmpv/qthelper.hpp +++ b/libmpv/qthelper.hpp @@ -202,9 +202,9 @@ private: if (list->values) free_node(&list->values[n]); } + delete[] list->keys; + delete[] list->values; } - delete[] list->keys; - delete[] list->values; delete list; break; } -- cgit v1.2.3