]> xenbits.xensource.com Git - unikraft/unikraft.git/commit
lib/posix-pipe: Fix ref leak on pipe creation
authorAndrei Tatar <andrei@unikraft.io>
Tue, 19 Nov 2024 12:55:28 +0000 (13:55 +0100)
committerUnikraft Bot <monkey@unikraft.io>
Mon, 9 Dec 2024 18:16:45 +0000 (18:16 +0000)
commitc2e4bbadd84f5cd4778bbb37f5f9635123c8278c
tree92b6d10bcace756affbf05ee2dcd813cadda6d1b
parent70c4f473240f9eefa4c52429890d97df79e89c19
lib/posix-pipe: Fix ref leak on pipe creation

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
lib/posix-pipe/pipe.c