mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-17 18:08:09 +02:00
wcap: Plug memory leak in wcap_decoder_create()
This commit is contained in:
parent
197214112c
commit
9988633f58
1 changed files with 3 additions and 1 deletions
|
|
@ -120,8 +120,10 @@ wcap_decoder_create(const char *filename)
|
|||
return NULL;
|
||||
|
||||
decoder->fd = open(filename, O_RDONLY);
|
||||
if (decoder->fd == -1)
|
||||
if (decoder->fd == -1) {
|
||||
free(decoder);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
fstat(decoder->fd, &buf);
|
||||
decoder->size = buf.st_size;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue