* [PATCH] android: fix reference leak in sync_fence_create
@ 2014-09-01 12:47 Maarten Lankhorst
0 siblings, 0 replies; only message in thread
From: Maarten Lankhorst @ 2014-09-01 12:47 UTC (permalink / raw)
To: Sumit Semwal, Greg Kroah-Hartman, linaro-mm-sig, LKML
Cc: Daniel Vetter, Colin Cross, John Stultz, devel, Dan Carpenter
According to the documentation sync_fence_create takes ownership of the point,
not a reference on the point.
This fixes a memory leak introduced in 3.17's android fence rework.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: Colin Cross <ccross@google.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/staging/android/sync.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index e7b2e0234196..69139ce7420d 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -199,7 +199,6 @@ struct sync_fence *sync_fence_create(const char *name, struct sync_pt *pt)
fence->num_fences = 1;
atomic_set(&fence->status, 1);
- fence_get(&pt->base);
fence->cbs[0].sync_pt = &pt->base;
fence->cbs[0].fence = fence;
if (fence_add_callback(&pt->base, &fence->cbs[0].cb,
--
2.0.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-09-01 12:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-01 12:47 [PATCH] android: fix reference leak in sync_fence_create Maarten Lankhorst
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).