--- environ.c.van       2010-08-21 10:29:19.000000000 +0400
+++ environ.c   2013-01-17 18:47:12.000000000 +0300
@@ -583,6 +583,7 @@
         */

        /* Free any connections belonging to this environment */
+       ENTER_CONNS_CS;
        for (lf = 0, nullcnt = 0; lf < conns_count; lf++)
        {
                if (NULL == conns[lf])
@@ -603,6 +604,7 @@
                conns = NULL;
                conns_count = 0;
        }
+       LEAVE_CONNS_CS;
        DELETE_ENV_CS(self);
        free(self);

