projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad545d1
)
softpipe: avoid leaking local_mem on machines alloc failure
author
Ilia Mirkin
<imirkin@alum.mit.edu>
Sun, 1 May 2016 02:31:26 +0000
(22:31 -0400)
committer
Ilia Mirkin
<imirkin@alum.mit.edu>
Sun, 1 May 2016 15:19:08 +0000
(11:19 -0400)
Spotted by Coverity
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Vinson Lee <vlee@freedesktop.org>
src/gallium/drivers/softpipe/sp_compute.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/softpipe/sp_compute.c
b/src/gallium/drivers/softpipe/sp_compute.c
index d5b5913f6a23ee2b07d79eee93b1f4636eae3d94..53f7a0beb7719061ca39bb4001c5ff7aabf105cb 100644
(file)
--- a/
src/gallium/drivers/softpipe/sp_compute.c
+++ b/
src/gallium/drivers/softpipe/sp_compute.c
@@
-191,8
+191,10
@@
softpipe_launch_grid(struct pipe_context *context,
}
machines = CALLOC(sizeof(struct tgsi_exec_machine *), num_threads_in_group);
- if (!machines)
+ if (!machines) {
+ FREE(local_mem);
return;
+ }
/* initialise machines + GRID_SIZE + THREAD_ID + BLOCK_SIZE */
for (d = 0; d < bdepth; d++) {