Skip to contentSkip to conversation

kconfig: fix qconf segfault by deleting heap objects

PATCH In review Chris Bainbridge 2 participants 2 messages Jan 8, 2016 – Jan 11, 2016 Kconfig

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kconfig: fix qconf segfault by deleting heap objects

On Debian stable (qt-4.8.6) 'make xconfig' intermittently fails due to qconf segfaulting at exit time in QXcbEventReader. The cause of this is destructors on the heap objects never being called, so fix this by properly deleting the heap objects before exit.

---
Trivial error, as described at https://forum.qt.io/topic/26658/solved-segfault-on-qapplication-exit

---
 scripts/kconfig/qconf.cc | 2 ++
 1 file changed, 2 insertions(+)
scripts/kconfig/qconf.cc +2 -0
index 91b7e6fbc364..fc5555992220 100644
@@ -1863,6 +1863,8 @@ int main(int ac, char** av)
 
 	configSettings->endGroup();
 	delete configSettings;
+	delete v;
+	delete configApp;
 
 	return 0;
 }
Signature · 1 line
2.1.4
#1 lore raw
Quoted 11 lines · Chris Bainbridge

On Debian stable (qt-4.8.6) 'make xconfig' intermittently fails due to qconf segfaulting at exit time in QXcbEventReader. The cause of this is destructors on the heap objects never being called, so fix this by properly deleting the heap objects before exit.

---
Trivial error, as described at https://forum.qt.io/topic/26658/solved-segfault-on-qapplication-exit

---
 scripts/kconfig/qconf.cc | 2 ++
 1 file changed, 2 insertions(+)

Applied to kbuild.git#kconfig, thanks.

Michal