Skip to content

Commit

Permalink
Add forgotten fclose-s
Browse files Browse the repository at this point in the history
  • Loading branch information
rsxrwscjpzdzwpxaujrr committed May 9, 2020
1 parent 8ba8962 commit 15a6ef5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ int config_read(Config* config) {
}

free(line);
fclose(file);

defaults:

Expand Down
4 changes: 4 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ float get_temp() {
filename,
strerror(errno));
fflush(stderr);

fclose(file);
return -1;
}

Expand All @@ -80,6 +82,8 @@ int set_mode(const char* mode) {
filename,
strerror(errno));
fflush(stderr);

fclose(file);
return -1;
}

Expand Down

0 comments on commit 15a6ef5

Please sign in to comment.