projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
728a0cd
)
drm/ttm: Fix memory leak in ttm_agp_backend.c
author
Masanari Iida
<standby24x7@gmail.com>
Wed, 12 Feb 2014 13:46:25 +0000
(22:46 +0900)
committer
Thomas Hellstrom
<thellstrom@vmware.com>
Tue, 18 Feb 2014 13:03:32 +0000
(14:03 +0100)
This patch fix a memory leak found by cppcheck.
[drivers/gpu/drm/ttm/ttm_agp_backend.c:129]:
(error) Memory leak: agp_be
Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
drivers/gpu/drm/ttm/ttm_agp_backend.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/ttm/ttm_agp_backend.c
b/drivers/gpu/drm/ttm/ttm_agp_backend.c
index 3302f99e7497002edf15f842d1b0abcebb71fbe4..764be36397fd2363d7bf9039574af51a6557136c 100644
(file)
--- a/
drivers/gpu/drm/ttm/ttm_agp_backend.c
+++ b/
drivers/gpu/drm/ttm/ttm_agp_backend.c
@@
-126,6
+126,7
@@
struct ttm_tt *ttm_agp_tt_create(struct ttm_bo_device *bdev,
agp_be->ttm.func = &ttm_agp_func;
if (ttm_tt_init(&agp_be->ttm, bdev, size, page_flags, dummy_read_page)) {
+ kfree(agp_be);
return NULL;
}