projects
/
profile
/
ivi
/
libdrm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
53e261c
)
intel: check return value for calloc
author
Dave Airlie
<airlied@redhat.com>
Tue, 2 Feb 2010 00:57:12 +0000
(10:57 +1000)
committer
Dave Airlie
<airlied@redhat.com>
Tue, 2 Feb 2010 00:57:12 +0000
(10:57 +1000)
intel/intel_bufmgr_gem.c
patch
|
blob
|
history
diff --git
a/intel/intel_bufmgr_gem.c
b/intel/intel_bufmgr_gem.c
index
f3af3a9
..
0d011a2
100644
(file)
--- a/
intel/intel_bufmgr_gem.c
+++ b/
intel/intel_bufmgr_gem.c
@@
-1727,6
+1727,9
@@
drm_intel_bufmgr_gem_init(int fd, int batch_size)
unsigned long size;
bufmgr_gem = calloc(1, sizeof(*bufmgr_gem));
+ if (bufmgr_gem == NULL)
+ return NULL;
+
bufmgr_gem->fd = fd;
if (pthread_mutex_init(&bufmgr_gem->lock, NULL) != 0) {