about summary refs log tree commit homepage
path: root/ext/raindrops/raindrops.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/raindrops/raindrops.c')
-rw-r--r--ext/raindrops/raindrops.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/raindrops/raindrops.c b/ext/raindrops/raindrops.c
index 65e3947..eb4694e 100644
--- a/ext/raindrops/raindrops.c
+++ b/ext/raindrops/raindrops.c
@@ -75,6 +75,7 @@ retry:
         r->drops = mmap(NULL, sizeof(struct raindrop) * r->size,
                         PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED, -1, 0);
         if (r->drops == MAP_FAILED) {
+                r->drops = NULL;
                 if ((errno == EAGAIN || errno == ENOMEM) && tries-- > 0) {
                         rb_gc();
                         goto retry;