Skip to content

Commit d13e606

Browse files
arichardsonTorrekie
authored andcommitted
Fix two memory leaks in tests
Found by running the tests with -fsanitize=address
1 parent 6ef79f9 commit d13e606

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

test/epoll-test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ ATF_TC_BODY_FD_LEAKCHECK(epoll__fd_exhaustion, tc)
209209
--i;
210210
ATF_REQUIRE(close(fds[i]) == 0);
211211
}
212+
free(fds);
212213
}
213214

214215
ATF_TC_WITHOUT_HEAD(epoll__invalid_op);

test/perf-many-fds.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ ATF_TC_BODY(perf_many_fds__perf, tc)
3737
fprintf(stderr, ".");
3838
}
3939
}
40+
free(eventfds);
4041
}
4142

4243
ATF_TP_ADD_TCS(tp)

0 commit comments

Comments
 (0)