summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/productkeycheck.cpp
diff options
context:
space:
mode:
authorkh1 <karsten.heimrich@digia.com>2013-03-13 16:41:07 +0100
committerKarsten Heimrich <karsten.heimrich@digia.com>2013-03-20 16:43:27 +0100
commit525102130f7bc274a23c9a342c5ad2e3e857df96 (patch)
treeaae78d30f676fdf8469597b562147d06fbdd9fde /src/libs/installer/productkeycheck.cpp
parent4fea99088af9b722505ca25d86577ea3eedd3739 (diff)
Fix some small memory leaks.
Change-Id: Ifb18ba7c3d83ac9cde7adf571625b13e876efd8e Reviewed-by: Niels Weber <niels.weber@digia.com> Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
Diffstat (limited to 'src/libs/installer/productkeycheck.cpp')
-rw-r--r--src/libs/installer/productkeycheck.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libs/installer/productkeycheck.cpp b/src/libs/installer/productkeycheck.cpp
index f975db821..120014dad 100644
--- a/src/libs/installer/productkeycheck.cpp
+++ b/src/libs/installer/productkeycheck.cpp
@@ -47,10 +47,8 @@ ProductKeyCheck::~ProductKeyCheck()
ProductKeyCheck *ProductKeyCheck::instance()
{
- static ProductKeyCheck *instance = 0;
- if (instance == 0)
- instance = new ProductKeyCheck();
- return instance;
+ static ProductKeyCheck instance;
+ return &instance;
}
bool ProductKeyCheck::hasValidKey()