Avoid a potential null pointer dereference

This commit is contained in:
Alex Young
2014-03-11 09:57:19 +00:00
parent 28c7e43e45
commit b063f41ba8

View File

@@ -110,8 +110,11 @@ int open_and_mmap(const char* filename, int* out_fd, uint64_t *out_size, void **
warn("mmap64() failed");
return -1;
}
debug("opened %s size %ld on fd %d @ %p", filename, size, *out_fd, *out_map);
}
else {
debug("opened %s size %ld on fd %d", filename, size, *out_fd);
}
debug("opened %s size %ld on fd %d @ %p", filename, size, *out_fd, *out_map);
return 0;
}