On 3/29/17 10:41 PM, Sergi Granell wrote:
Signed-off-by: Sergi Granell <[email protected]>

Well, good: ;-)
Reviewed-by: Quentin Glidic <[email protected]>

And pushed:
fec723ef..597dde5c  master -> master

Thanks,


---
  wcap/wcap-decode.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/wcap/wcap-decode.c b/wcap/wcap-decode.c
index e3b8985f..7e8c8477 100644
--- a/wcap/wcap-decode.c
+++ b/wcap/wcap-decode.c
@@ -131,6 +131,7 @@ wcap_decoder_create(const char *filename)
                            PROT_READ, MAP_PRIVATE, decoder->fd, 0);
        if (decoder->map == MAP_FAILED) {
                fprintf(stderr, "mmap failed\n");
+               close(decoder->fd);
                free(decoder);
                return NULL;
        }
@@ -146,6 +147,7 @@ wcap_decoder_create(const char *filename)
        frame_size = header->width * header->height * 4;
        decoder->frame = malloc(frame_size);
        if (decoder->frame == NULL) {
+               close(decoder->fd);
                free(decoder);
                return NULL;
        }



--

Quentin “Sardem FF7” Glidic
_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to