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

This commit is contained in:
Maxim Dounin 2012-04-02 21:30:58 +00:00
parent a5d4f66ad6
commit 9063bc8713

View File

@ -15,7 +15,7 @@ ngx_shm_alloc(ngx_shm_t *shm)
u_char *name; u_char *name;
uint64_t size; 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) { if (name == NULL) {
return NGX_ERROR; return NGX_ERROR;
} }