diff options
author | Brian Paul <[email protected]> | 2016-05-03 15:07:56 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-05-03 15:40:49 -0600 |
commit | ef5a31fc06d58ad655fd6b71ed3e939147e67108 (patch) | |
tree | 85d7d5ff9de12a27c8cd3453ed4d11844da218a8 /src/gallium/auxiliary/util/u_bitmask.c | |
parent | 68116dcd5a05508af06cd41ca14faab1b910a934 (diff) |
gallium/util: change assertion to conditional in util_bitmask_destroy()
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 <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util/u_bitmask.c')
-rw-r--r-- | src/gallium/auxiliary/util/u_bitmask.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/util/u_bitmask.c b/src/gallium/auxiliary/util/u_bitmask.c index c22f5068923..b15dfd8d678 100644 --- 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); + } } |