client/Android: fix bad realloc

Fast and long pointer moves cause app to crash.
This commit is contained in:
Zavadovsky Yan 2015-02-21 23:49:29 +03:00
parent c3bbe706fb
commit ac8b50c464

View File

@ -76,7 +76,8 @@ void android_push_event(freerdp * inst, ANDROID_EVENT* event)
if (aCtx->event_queue->count >= aCtx->event_queue->size)
{
aCtx->event_queue->size = aCtx->event_queue->size * 2;
aCtx->event_queue->events = realloc((void*) aCtx->event_queue->events, aCtx->event_queue->size);
aCtx->event_queue->events = realloc((void*) aCtx->event_queue->events,
sizeof(ANDROID_EVENT*) * aCtx->event_queue->size);
}
aCtx->event_queue->events[(aCtx->event_queue->count)++] = event;