[nginx] svn commit: r4571 - trunk/src/os/win32

mdounin at mdounin.ru mdounin at mdounin.ru
Mon Apr 2 21:30:58 UTC 2012


Author: mdounin
Date: 2012-04-02 21:30:58 +0000 (Mon, 02 Apr 2012)
New Revision: 4571
URL: http://trac.nginx.org/nginx/changeset/4571/nginx

Log:
Win32: fixed memory allocation for shmem name (ticket #134).


Modified:
   trunk/src/os/win32/ngx_shmem.c

Modified: trunk/src/os/win32/ngx_shmem.c
===================================================================
--- trunk/src/os/win32/ngx_shmem.c	2012-04-02 21:29:35 UTC (rev 4570)
+++ trunk/src/os/win32/ngx_shmem.c	2012-04-02 21:30:58 UTC (rev 4571)
@@ -15,7 +15,7 @@
     u_char    *name;
     uint64_t   size;
 
-    name = ngx_alloc(shm->name.len + 2 + sizeof(NGX_INT32_LEN), shm->log);
+    name = ngx_alloc(shm->name.len + 2 + NGX_INT32_LEN, shm->log);
     if (name == NULL) {
         return NGX_ERROR;
     }



More information about the nginx-devel mailing list