Browse Source

replace use of fclose() on a descriptor returned by popen(2) (from Carl Hetherington but manually applied)

tags/0.124
Paul Davis 11 years ago
parent
commit
891ad914da
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      libjack/client.c

+ 3
- 3
libjack/client.c View File

@@ -168,7 +168,7 @@ jack_get_tmpdir ()
}

if (fgets (buf, sizeof (buf), in) == NULL) {
fclose (in);
pclose (in);
free (pathcopy);
return -1;
}
@@ -177,7 +177,7 @@ jack_get_tmpdir ()

if (buf[len-1] != '\n') {
/* didn't get a whole line */
fclose (in);
pclose (in);
free (pathcopy);
return -1;
}
@@ -190,7 +190,7 @@ jack_get_tmpdir ()
memcpy (jack_tmpdir, buf, len-1);
jack_tmpdir[len-1] = '\0';
fclose (in);
pclose (in);
free (pathcopy);

return 0;


Loading…
Cancel
Save