sna/dri: Fix typo, check for NULL after allocations to spot failure!

Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-06-01 17:05:55 +01:00
parent dc0fe44beb
commit 1ef00ff720
1 changed files with 2 additions and 2 deletions

View File

@ -1369,7 +1369,7 @@ sna_dri_schedule_flip(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front,
}
info = calloc(1, sizeof(struct sna_dri_frame_event));
if (!info)
if (info == NULL)
return FALSE;
info->type = type;
@ -1415,7 +1415,7 @@ sna_dri_schedule_flip(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front,
info->event_data);
} else {
info = calloc(1, sizeof(struct sna_dri_frame_event));
if (info)
if (info == NULL)
return FALSE;
info->sna = sna;