Bug 623169 - Memory leaks in GIMP

Plug leak by allocating the data on the stack.
This commit is contained in:
Sven Neumann 2010-07-15 21:40:56 +02:00
parent 4fea27ec1d
commit e14c50aaef
1 changed files with 1 additions and 2 deletions

View File

@ -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;
}