Skip to content

Commit

Permalink
pipelimit: close file stream in case of error in get cpu
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Jan 30, 2017
1 parent 83b0afa commit 5591d9c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/modules/pipelimit/pipelimit.c
Expand Up @@ -222,6 +222,7 @@ static int get_cpuload(double * load)
if (fscanf(f, "cpu %lld%lld%lld%lld%lld%lld%lld%lld",
&n_user, &n_nice, &n_sys, &n_idle, &n_iow, &n_irq, &n_sirq, &n_stl) < 0) {
LM_ERR("could not parse load information\n");
fclose(f);
return -1;
}
fclose(f);
Expand Down

0 comments on commit 5591d9c

Please sign in to comment.