summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary King <gking@nvidia.com>2010-05-11 15:57:12 -0700
committerGary King <gking@nvidia.com>2010-05-11 16:04:36 -0700
commitc7ed1024ffd4c802ea4a8a7bc54307cae4fb2f11 (patch)
tree37749af4e708514a731508c88bc69e07d7ca34e1
parentf24ec023e2d60362372d86d0ee5d95a0d4c2a439 (diff)
nvmap: free from correct carveout block if init split heap fails
fix a coding error where the wrong carveout structure (an uninit variable) was specified as the heap to free. Change-Id: Ic2bdd66c52afffeaebe720e96a7513db32f41a72 Reviewed-on: http://git-master/r/1364 Reviewed-by: Gary King <gking@nvidia.com> Tested-by: Gary King <gking@nvidia.com>
-rw-r--r--drivers/char/nvmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/nvmap.c b/drivers/char/nvmap.c
index 0aed35a2c61d..cdcb9f63cd7e 100644
--- a/drivers/char/nvmap.c
+++ b/drivers/char/nvmap.c
@@ -2834,7 +2834,7 @@ static int nvmap_split_carveout_heap(struct nvmap_carveout *co, size_t size,
spin_unlock(&co->lock);
if (_nvmap_init_carveout(&n->carveout,name, blkbase, blksize)) {
- nvmap_carveout_free(&i->carveout, idx);
+ nvmap_carveout_free(co, idx);
idx = -1;
} else {
spin_lock(&co->lock);