# HG changeset patch # User Maxim Dounin # Date 1333402258 0 # Node ID b3d4e9c66e2420f31e4d5c2145eb51b0c485dabb # Parent 1db899642518526fde00d9a587e7f6783ec20fcc Win32: fixed memory allocation for shmem name (ticket #134). diff --git a/src/os/win32/ngx_shmem.c b/src/os/win32/ngx_shmem.c --- a/src/os/win32/ngx_shmem.c +++ b/src/os/win32/ngx_shmem.c @@ -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; }