Message ID | 1299084010-8762-6-git-send-email-ken.werner@linaro.org |
---|---|
State | Accepted |
Commit | 6a072982ddd0b8c1597ac2aa17559732c8b5e763 |
Headers | show |
diff --git a/src/os-linux.h b/src/os-linux.h index af301ce..4e225dc 100644 --- a/src/os-linux.h +++ b/src/os-linux.h @@ -80,7 +80,11 @@ maps_init (struct map_iterator *mi, pid_t pid) cp = mmap (0, mi->buf_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); if (cp == MAP_FAILED) - return -1; + { + close(mi->fd); + mi->fd = -1; + return -1; + } else { mi->offset = 0;