Commit 8488a8b2 authored by Rogier R. Mulhuijzen's avatar Rogier R. Mulhuijzen Committed by Tollef Fog Heen

Clean up VSM setup if mmap fails

Fixes #995 (the rest of it).
parent 40575c5d
......@@ -188,6 +188,9 @@ vsm_open(struct VSM_data *vd, int diag)
if (diag)
vd->diag(vd->priv, "Cannot mmap %s: %s\n",
vd->fname, strerror(errno));
AZ(close(vd->vsm_fd));
vd->vsm_fd = -1;
vd->VSM_head = NULL;
return (1);
}
vd->vsm_end = (uint8_t *)vd->VSM_head + slh.shm_size;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment