diff options
| author | Lubomir Rintel <lkundrak@v3.sk> | 2013-11-15 14:17:56 +0100 |
|---|---|---|
| committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-11-15 16:21:45 -0800 |
| commit | 4a196570a3f528e9092014f8320f4a2bb4aba680 (patch) | |
| tree | 58d6b83e941c2f712258cce16ec77c17ea28116f /src | |
| parent | Add documentation for wl_shm_buffer_begin/end_access (diff) | |
| download | wayland-4a196570a3f528e9092014f8320f4a2bb4aba680.tar wayland-4a196570a3f528e9092014f8320f4a2bb4aba680.tar.gz wayland-4a196570a3f528e9092014f8320f4a2bb4aba680.tar.bz2 wayland-4a196570a3f528e9092014f8320f4a2bb4aba680.tar.lz wayland-4a196570a3f528e9092014f8320f4a2bb4aba680.tar.xz wayland-4a196570a3f528e9092014f8320f4a2bb4aba680.tar.zst wayland-4a196570a3f528e9092014f8320f4a2bb4aba680.zip | |
shm: Avoid file descriptor leak upon unsuccessful mmap
It would be possible to make the compositor leak file descriptors by
passing descriptors of open unmmapable files to it, such as /dev/null.
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Diffstat (limited to 'src')
| -rw-r--r-- | src/wayland-shm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wayland-shm.c b/src/wayland-shm.c index 814a4cf..590f775 100644 --- a/src/wayland-shm.c +++ b/src/wayland-shm.c @@ -241,7 +241,7 @@ shm_create_pool(struct wl_client *client, struct wl_resource *resource, wl_resource_post_error(resource, WL_SHM_ERROR_INVALID_FD, "failed mmap fd %d", fd); - goto err_free; + goto err_close; } close(fd); |
