Previously uk_sys_pipe would return pipe files with one too many
references counted, leading to pipes never closing and leaking memory.
This change corrects this oversight by releasing the raw pipe files
after they have been entered into the fdtab.
Signed-off-by: Andrei Tatar <andrei@unikraft.io>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1539
if (unlikely(r < 0))
goto err_close;
+ uk_file_release(pipes[0]);
+ uk_file_release(pipes[1]);
pipefd[0] = rpipe;
pipefd[1] = r;
return 0;