mirror of https://github.com/GNOME/gimp.git
Bug 623169 - Memory leaks in GIMP
Plug leak by allocating the data on the stack.
This commit is contained in:
parent
4fea27ec1d
commit
e14c50aaef
modules
|
@ -653,13 +653,12 @@ dx_dinput_event_dispatch (GSource *source,
|
|||
gint i;
|
||||
GimpControllerEvent cevent = { 0, };
|
||||
|
||||
data = g_malloc (format->dwDataSize);
|
||||
data = g_alloca (format->dwDataSize);
|
||||
|
||||
if (FAILED ((hresult = IDirectInputDevice8_GetDeviceState (input->didevice8,
|
||||
format->dwDataSize,
|
||||
data))))
|
||||
{
|
||||
g_free (data);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue