diff options
author | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2007-02-08 18:59:02 +0100 |
---|---|---|
committer | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2007-02-08 18:59:02 +0100 |
commit | bf8f46d4c64eb5b66814223f7e5ddb8d8e7a555e (patch) | |
tree | 24ede8ce1f30bb21ea0cc1ad6f30a48c753ac4be /linux-core/drm_bo_move.c | |
parent | e4b2da440699f581a8779ea8cb9e99e4c903e6a7 (diff) |
Fix mm_block leak.
Some other minor fixes.
Diffstat (limited to 'linux-core/drm_bo_move.c')
-rw-r--r-- | linux-core/drm_bo_move.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/linux-core/drm_bo_move.c b/linux-core/drm_bo_move.c index b7a49299..4ed3392d 100644 --- a/linux-core/drm_bo_move.c +++ b/linux-core/drm_bo_move.c @@ -243,6 +243,11 @@ int drm_bo_move_memcpy(drm_buffer_object_t *bo, } mb(); out2: + if (old_mem->mm_node) { + mutex_lock(&dev->struct_mutex); + drm_mm_put_block(old_mem->mm_node); + mutex_unlock(&dev->struct_mutex); + } *old_mem = *new_mem; new_mem->mm_node = NULL; old_mem->mask = save_mask; |