commit | 5fe7e7ca78eb8c5435f35ed47b54aabdbdcaadf7 | [log] [tgz] |
---|---|---|
author | Sergi Granell <xerpi.g.12@gmail.com> | Thu Feb 18 23:59:29 2016 +0100 |
committer | Bryce Harrington <bryce@osg.samsung.com> | Tue Mar 08 16:37:20 2016 -0800 |
tree | a35e17096f0d40a58b5a5866e39bbb9ce32c8d84 | |
parent | ba2ee84113e7f9fef9af2ec3998ee437adab5382 [diff] |
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: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>