Don't operate on un(initalized|locked) page
authormalc <av1474@comtv.ru>
Sat, 1 Jun 2013 18:59:20 +0000 (1 22:59 +0400)
committermalc <av1474@comtv.ru>
Sat, 1 Jun 2013 18:59:20 +0000 (1 22:59 +0400)
link.c

diff --git a/link.c b/link.c
index fd06079..196ef94 100644 (file)
--- a/link.c
+++ b/link.c
@@ -3087,15 +3087,15 @@ CAMLprim value ml_markunder (value ptr_v, value x_v, value y_v, value mark_v)
         }
     }
  unlock:
-    unlock ("ml_markunder");
-
- done:
     if (!Bool_val (ret_v)) {
         page->fmark.span = NULL;
         page->lmark.span = NULL;
         page->fmark.i = 0;
         page->lmark.i = 0;
     }
+    unlock ("ml_markunder");
+
+ done:
     CAMLreturn (ret_v);
 }