Unverified Commit 1b3e4274 by Stéphane Graber Committed by GitHub

Merge pull request #3275 from brauner/2020-03-05/api_extension

utils: only move_fd() when fdopen() has been successful
parents 4f31df93 92bdc593
......@@ -1724,9 +1724,10 @@ static int process_dead(/* takes */ int status_fd)
return -1;
/* transfer ownership of fd */
f = fdopen(move_fd(dupfd), "re");
f = fdopen(dupfd, "re");
if (!f)
return -1;
move_fd(dupfd);
ret = 0;
while (getline(&line, &n, f) != -1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment