Skip to content

Commit

Permalink
drivers/video/sgivwfb.c: fix memory leaks in removal path
Browse files Browse the repository at this point in the history
We were leaking both the cmap memory and the info struct memory.

Signed-off-by: Andres Salomon <dilinger@debian.org>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Andres Salomon authored and Linus Torvalds committed Apr 1, 2009
1 parent 6a7f282 commit d4bc4e8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/video/sgivwfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,8 @@ static int sgivwfb_remove(struct platform_device *dev)
iounmap(par->regs);
iounmap(info->screen_base);
release_mem_region(DBE_REG_PHYS, DBE_REG_SIZE);
fb_dealloc_cmap(&info->cmap);
framebuffer_release(info);
}
return 0;
}
Expand Down

0 comments on commit d4bc4e8

Please sign in to comment.