projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68116dc
)
gallium/util: change assertion to conditional in util_bitmask_destroy()
author
Brian Paul
<brianp@vmware.com>
Tue, 3 May 2016 21:07:56 +0000
(15:07 -0600)
committer
Brian Paul
<brianp@vmware.com>
Tue, 3 May 2016 21:40:49 +0000
(15:40 -0600)
If we fail to create a context in the VMware driver we call this function
unconditionally to free a bunch of bit vectors. Instead of asserting on
a null pointer, just no-op.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/util/u_bitmask.c
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/util/u_bitmask.c
b/src/gallium/auxiliary/util/u_bitmask.c
index
c22f506
..
b15dfd8
100644
(file)
--- a/
src/gallium/auxiliary/util/u_bitmask.c
+++ b/
src/gallium/auxiliary/util/u_bitmask.c
@@
-320,9
+320,9
@@
util_bitmask_get_first_index(struct util_bitmask *bm)
void
util_bitmask_destroy(struct util_bitmask *bm)
{
- assert(bm);
-
-
FREE(bm->words
);
- FREE(bm);
+ if (bm) {
+ FREE(bm->words);
+
FREE(bm
);
+ }
}