Skip to content

Commit ea53923

Browse files
authored
Merge pull request #758 from ldorau/Close_file_descriptor_in_is_mapped_with_MAP_SYNC
Close file descriptor in is_mapped_with_MAP_SYNC()
2 parents 9beff47 + 3ea8614 commit ea53923

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/common/test_helpers_linux.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ bool is_mapped_with_MAP_SYNC(char *path, char *buf, size_t size_buf) {
4040
smaps = strstr(buf, path);
4141
}
4242

43+
(void)close(fd);
44+
4345
// String starting from the "sf" flag
4446
// marking that memory was mapped with the MAP_SYNC flag.
4547
char *sf_flag = NULL;

0 commit comments

Comments
 (0)