Menu

#163 slpd_main.c:366]: (error) Resource leak: fd

v2.1
open
nobody
None
5
2018-02-17
2018-02-17
dcb
No

Source code is

  (void)fread(pidstr,13,1,fd);
  pid = atoi(pidstr);
  if (pid && kill(pid, 0) == 0)
     return -1;  /* we are already running */
  fclose(fd);

Suggest make sure fclose is called before the return.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB