am 0b0435ea: [gatekeeperd] fix file descriptor leak
* commit '0b0435ea87f87b31652a2c6272c1f77438bfcdf1': [gatekeeperd] fix file descriptor leak
This commit is contained in:
commit
b8fb72e02f
1 changed files with 1 additions and 0 deletions
|
|
@ -112,6 +112,7 @@ public:
|
||||||
int fd = open(filename, O_RDONLY);
|
int fd = open(filename, O_RDONLY);
|
||||||
if (fd < 0) return 0;
|
if (fd < 0) return 0;
|
||||||
read(fd, &sid, sizeof(sid));
|
read(fd, &sid, sizeof(sid));
|
||||||
|
close(fd);
|
||||||
return sid;
|
return sid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue