diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2014-06-26 07:32:31 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:10:19 -0400 |
commit | 779bfb2e3f986c412659a618e228eb6fcfbc0221 (patch) | |
tree | 6bd2c20a201ee790e55a33a6eee0db323fa9923a /drivers | |
parent | 054160176eeedf190464225dede91f9a39b9fb97 (diff) |
gpu: nvgpu: Free allocated gr_ctx
gr_ctx is nowadays kalloc()'d separately. Adding kfree() to prevent
memory leak.
Bug 1528275
Change-Id: I942812a483adad47e82bc75a7bda5942c30c527a
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/428890
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index bd9476e4..b06ed9e6 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -2641,6 +2641,7 @@ static void __gr_gk20a_free_gr_ctx(struct gk20a *g, | |||
2641 | gr_ctx->pages, gr_ctx->iova, &attrs); | 2641 | gr_ctx->pages, gr_ctx->iova, &attrs); |
2642 | gr_ctx->pages = NULL; | 2642 | gr_ctx->pages = NULL; |
2643 | gr_ctx->iova = 0; | 2643 | gr_ctx->iova = 0; |
2644 | kfree(gr_ctx); | ||
2644 | } | 2645 | } |
2645 | 2646 | ||
2646 | void gr_gk20a_free_tsg_gr_ctx(struct tsg_gk20a *tsg) | 2647 | void gr_gk20a_free_tsg_gr_ctx(struct tsg_gk20a *tsg) |