mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
r7030@Kushana: nickm | 2006-08-04 14:46:52 -0700
Close an fd leak on failed mmap() svn:r6988
This commit is contained in:
@@ -134,6 +134,7 @@ tor_mmap_file(const char *filename)
|
||||
|
||||
string = mmap(0, size, PROT_READ, MAP_PRIVATE, fd, 0);
|
||||
if (string == MAP_FAILED) {
|
||||
close(fd);
|
||||
log_warn(LD_FS,"Could not mmap file \"%s\": %s", filename,
|
||||
strerror(errno));
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user