Blame SOURCES/0002-Free-coroutine-stack-when-releasing-coroutine.patch

09badb
From 63c2a334ca2d1c13f8f6d424ff5ebdc2c166ce63 Mon Sep 17 00:00:00 2001
09badb
From: "Daniel P. Berrange" <berrange@redhat.com>
09badb
Date: Fri, 13 Sep 2013 12:06:57 +0100
09badb
Subject: [PATCH] Free coroutine stack when releasing coroutine
09badb
09badb
For
09badb
09badb
  https://bugzilla.redhat.com/show_bug.cgi?id=1007837
09badb
09badb
The coroutine_init function mmap's a stack for the
09badb
ucontext coroutine, but nothing ever munmaps it.
09badb
09badb
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
09badb
(cherry picked from commit 49fbd957cb686ff3f9c31923ff17a9529edd9c13)
09badb
---
09badb
 src/coroutine_ucontext.c | 2 ++
09badb
 1 file changed, 2 insertions(+)
09badb
09badb
diff --git a/src/coroutine_ucontext.c b/src/coroutine_ucontext.c
09badb
index 848016e..8fe650e 100644
09badb
--- a/src/coroutine_ucontext.c
09badb
+++ b/src/coroutine_ucontext.c
09badb
@@ -42,6 +42,8 @@ static int _coroutine_release(struct continuation *cc)
09badb
             return ret;
09badb
     }
09badb
 
09badb
+    munmap(co->cc.stack, co->cc.stack_size);
09badb
+
09badb
     co->caller = NULL;
09badb
 
09badb
     return 0;