Skip to content

Commit

Permalink
Merge pull request NeuronRobotics#216 from MrDOS/bugfix/fix-uucp-chec…
Browse files Browse the repository at this point in the history
…k-file-descriptor-leak

Fix FD leak when checking lock dir permissions.
  • Loading branch information
MrDOS authored May 4, 2021
2 parents 6c54eeb + 2d3743e commit 5d48a20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/c/src/SerialImp.c
Original file line number Diff line number Diff line change
Expand Up @@ -5835,7 +5835,7 @@ int check_group_uucp()
strcat(testLockAbsFileName, testLockFileDirName);
strcat(testLockAbsFileName, "/");
strcat(testLockAbsFileName, testLockFileName);
if ( 0 == mkstemp(testLockAbsFileName) )
if ( 0 == strlen(mktemp(testLockAbsFileName)) )
{
free(testLockAbsFileName);
report_error("check_group_uucp(): mktemp malformed string - \
Expand Down

0 comments on commit 5d48a20

Please sign in to comment.