mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
copy_and_spawn_sgid: Avoid double calls to close()
If close() on infd and outfd succeeded, reset the fd numbers so that we don't attempt to close them again. Reviewed-by: Arjun Shankar <arjun@redhat.com>
This commit is contained in:
@@ -170,6 +170,7 @@ copy_and_spawn_sgid (char *child_id, gid_t gid)
|
|||||||
support_subprogram because we only want the program exit status, not the
|
support_subprogram because we only want the program exit status, not the
|
||||||
contents. */
|
contents. */
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
infd = outfd = -1;
|
||||||
|
|
||||||
char * const args[] = {execname, child_id, NULL};
|
char * const args[] = {execname, child_id, NULL};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user