Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coverity Scan (CID 1352365) [/player/src/tizdaemon.cpp:daemonize] : Resource leak #233

Closed
tizonia opened this issue Mar 6, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@tizonia
Copy link
Owner

commented Mar 6, 2016

  • CID : 1352365
  • Type : Resource leak
  • Impact : High
  • Status : New
  • First Detected : 02/29/16
  • Classification : Unclassified
  • Severity : Unspecified
  • Component : player
  • Category : Resource leaks
  • File : /player/src/tizdaemon.cpp
  • Function : daemonize
121  // Reopen standard fd's to /dev/null
122  close (STDIN_FILENO);
    14. open_fn: Returning handle opened by open.
    15. var_assign: Assigning: fd = handle returned from open("/dev/null", 2).
123  fd = open ("/dev/null", O_RDWR);
    16. Condition fd != 0, taking true branch
124  if (fd != STDIN_FILENO)
125  {
126    // 'fd' should be 0

CID 1352365 (#1 of 1): Resource leak (RESOURCE_LEAK)
17. leaked_handle: Handle variable fd going out of scope leaks the handle.
127    return TIZ_DAEMON_FAILURE;
128  }
129  if (dup2 (STDIN_FILENO, STDOUT_FILENO) != STDOUT_FILENO)
130  {
131    return TIZ_DAEMON_FAILURE;
132  }

@tizonia tizonia added the bug label Mar 6, 2016

@juanrubio juanrubio closed this in a1fc3ff Mar 12, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.