Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
4.5.3, 4.7.0
-
None
-
Mandriva Linux 2008/ Qt 4.5.3
Description
Found massive memory leakage in our application using (modified) valgrind :
This bug was found using Mandriva 2008. In our Mandriva 2010 setup, it never enters that function at all, probably due to different wacom events from driver?. Still, its a Qt bug.
In function :
void fetchWacomToolId(int &deviceType, qint64 &serialId)
...
WACOMCONFIG *config = ptrWacomConfigInit(X11->display, 0);
if (config == 0)
return;
const char *name = "stylus"; // TODO get this from the X config instead (users may have called it differently)
WACOMDEVICE *device = ptrWacomConfigOpenDevice (config, name);
if (device == 0)
return;
...
If ptrWacomConfigOpenDevice returns 0, config is leaked.
Fix : Add ptrWacomConfigTerm(config) :
if (device == 0)
{
ptrWacomConfigTerm(config);
return;
}