]> git.kaiwu.me - nginx.git/commitdiff
Win32: fixed memory allocation for shmem name (ticket #134).
authorMaxim Dounin <mdounin@mdounin.ru>
Mon, 2 Apr 2012 21:30:58 +0000 (21:30 +0000)
committerMaxim Dounin <mdounin@mdounin.ru>
Mon, 2 Apr 2012 21:30:58 +0000 (21:30 +0000)
src/os/win32/ngx_shmem.c

index 07a6714387830fb2b61c695f595adb8fa93f0e8d..5f3af8bc5d460aed35edc69685d07117c6656172 100644 (file)
@@ -15,7 +15,7 @@ ngx_shm_alloc(ngx_shm_t *shm)
     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;
     }