From 5a74d76d9fe9f2a49f5e0d062da590ecc08cf9bb Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 1 Feb 2011 11:42:25 +0100 Subject: Fix leak in QFactoryLoader We need to release the library in case of errors --- src/corelib/plugin/qfactoryloader.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/corelib/plugin/qfactoryloader.cpp b/src/corelib/plugin/qfactoryloader.cpp index 1be32ad..c0b947a 100644 --- a/src/corelib/plugin/qfactoryloader.cpp +++ b/src/corelib/plugin/qfactoryloader.cpp @@ -155,9 +155,11 @@ void QFactoryLoader::update() continue; } QObject *instance = library->instance(); - if (!instance) + if (!instance) { + library->release(); // ignore plugins that have a valid signature but cannot be loaded. continue; + } QFactoryInterface *factory = qobject_cast(instance); if (instance && factory && instance->qt_metacast(d->iid)) keys = factory->keys(); -- cgit v0.12 ption value='QT_5_13_1'>QT_5_13_1 Qt s a cross-platform application framework that is used for developing application software that can be run on various software and hardware platforms with little or no change in the underlying codebase, while still being a native application with native capabilities and speed.
summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2009-11-02 10:01:08 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2009-11-02 10:01:08 (GMT)
commit5e0bdffd92cbff2a9eb551f77850a24bf2a2116a (patch)
treefcf764b8326d8282e7f194a4fe1b2a88a7082319 /util
parentb68cd1df21935fc032a93c7d7bc33fcb77c7b8cd (diff)