projects
/
profile
/
ivi
/
weston.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1972141
)
wcap: Plug memory leak in wcap_decoder_create()
author
Martin Olsson
<martin@minimum.se>
Sun, 8 Jul 2012 01:03:46 +0000
(
03:03
+0200)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Mon, 9 Jul 2012 21:50:46 +0000
(17:50 -0400)
wcap/wcap-decode.c
patch
|
blob
|
history
diff --git
a/wcap/wcap-decode.c
b/wcap/wcap-decode.c
index
425ccff
..
3dc7e6d
100644
(file)
--- a/
wcap/wcap-decode.c
+++ b/
wcap/wcap-decode.c
@@
-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;