mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
fish: Don't leak stdout_saved_fd on error path (found by Coverity).
This commit is contained in:
@@ -1147,6 +1147,8 @@ issue_command (const char *cmd, char *argv[], const char *pipecmd,
|
||||
*/
|
||||
if (fflush (stdout) == EOF) {
|
||||
perror ("failed to flush standard output");
|
||||
if (pipecmd)
|
||||
close (stdout_saved_fd);
|
||||
return -1;
|
||||
}
|
||||
if (ferror (stdout)) {
|
||||
|
||||
Reference in New Issue
Block a user