Skip to content

Commit

Permalink
corex: close fd if ftell() fails inside file_read()
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Jan 30, 2017
1 parent 0548129 commit 4d12867
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/modules/corex/corex_mod.c
Expand Up @@ -343,6 +343,7 @@ static int w_file_read(sip_msg_t *msg, char *fn, char *vn)
fsize = ftell(f);
if(fsize<0) {
LM_ERR("ftell failed on file: %.*s\n", fname.len, fname.s);
fclose(f);
return -1;
}
fseek(f, 0, SEEK_SET);
Expand Down

0 comments on commit 4d12867

Please sign in to comment.