Skip to content
Commit 5fe7e7ca authored by Sergi Granell's avatar Sergi Granell Committed by Bryce Harrington
Browse files

server: Fix shm_create_pool size fail path fd leak



If the client passed a size <= 0 to shm_create_pool, it would
go to err_free, which wouldn't close the fd, and thus leave it opened.

We can also move the size check before the struct wl_shm_pool
malloc, so in case the client passes a wrong size, it won't
do an unnecessary malloc and then free.
Reviewed-by: default avatarBryce Harrington <bryce@osg.samsung.com>
Reviewed-by: default avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
parent ba2ee841
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment