Skip to content

Commit

Permalink
Fix memfd_create emulation bug on FreeBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
quantum5 committed Dec 28, 2024
1 parent c88ef56 commit cbb0f87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dmoj/cptbox/helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ int memory_fd_create(void) {
#ifdef __FreeBSD__
char filename[] = "/tmp/cptbox-memoryfd-XXXXXXXX";
int fd = mkstemp(filename);
if (fd > 0)
if (fd >= 0)
unlink(filename);
return fd;
#else
Expand Down

0 comments on commit cbb0f87

Please sign in to comment.