]> git.kaiwu.me - nginx.git/commitdiff
Merge of r4223:
authorMaxim Dounin <mdounin@mdounin.ru>
Tue, 13 Dec 2011 19:01:10 +0000 (19:01 +0000)
committerMaxim Dounin <mdounin@mdounin.ru>
Tue, 13 Dec 2011 19:01:10 +0000 (19:01 +0000)
FreeBSD's MALLOC_OPTIONS must be set before any malloc() call.
The bug has been introduced in r3799.

src/core/nginx.c

index b8bab37e3f509561bf456d5a96782a20d59c51b0..3a413e84e31767ac2cf3c6032e99fe44ef5c84c0 100644 (file)
@@ -203,6 +203,10 @@ main(int argc, char *const *argv)
     ngx_cycle_t      *cycle, init_cycle;
     ngx_core_conf_t  *ccf;
 
+#if (NGX_FREEBSD)
+    ngx_debug_init();
+#endif
+
     if (ngx_strerror_init() != NGX_OK) {
         return 1;
     }
@@ -260,10 +264,6 @@ main(int argc, char *const *argv)
         }
     }
 
-#if (NGX_FREEBSD)
-    ngx_debug_init();
-#endif
-
     /* TODO */ ngx_max_sockets = -1;
 
     ngx_time_init();