diff options
author | Chad Versace <[email protected]> | 2015-05-05 19:05:28 -0700 |
---|---|---|
committer | Chad Versace <[email protected]> | 2015-05-07 08:11:21 -0700 |
commit | a93ab73a074e0c25ff5ceca7fc1141a9bea82c8f (patch) | |
tree | e129626996e5d8fddc5587a2301a01b60e036145 /src/mesa/drivers | |
parent | a6bfdd7b46170bd8105303063717c45f7e6fafee (diff) |
i965/sync: Don't crash when deleting sync object
Don't pass NULL to drm_intel_bo_unreference(). It doesn't like that.
Bug found by code inspection.
Reviewed-by: Daniel Stone <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_syncobj.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_syncobj.c b/src/mesa/drivers/dri/i965/intel_syncobj.c index e500fa04c51..3bc32dfa3ee 100644 --- a/src/mesa/drivers/dri/i965/intel_syncobj.c +++ b/src/mesa/drivers/dri/i965/intel_syncobj.c @@ -59,7 +59,9 @@ intel_delete_sync_object(struct gl_context *ctx, struct gl_sync_object *s) { struct intel_sync_object *sync = (struct intel_sync_object *)s; - drm_intel_bo_unreference(sync->bo); + if (sync->bo) + drm_intel_bo_unreference(sync->bo); + free(sync); } |