mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 06:13:03 +01:00
Fixing couple leaking file descriptors
This commit is contained in:
parent
6669d5632f
commit
ec23cedc3a
@ -284,6 +284,8 @@ int dir_match(ToxWindow *self, Tox *m, const wchar_t *line, const wchar_t *cmd)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
closedir(dp);
|
||||||
|
|
||||||
if (dircount == 0)
|
if (dircount == 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
@ -325,6 +325,7 @@ static void chat_onFileSendRequest(ToxWindow *self, Tox *m, int32_t num, uint8_t
|
|||||||
int count = 1;
|
int count = 1;
|
||||||
|
|
||||||
while ((filecheck = fopen(filename, "r"))) {
|
while ((filecheck = fopen(filename, "r"))) {
|
||||||
|
fclose(filecheck);
|
||||||
filename[len] = '\0';
|
filename[len] = '\0';
|
||||||
char d[9];
|
char d[9];
|
||||||
sprintf(d, "(%d)", count++);
|
sprintf(d, "(%d)", count++);
|
||||||
|
Loading…
Reference in New Issue
Block a user