projects
/
sxemacs
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
24394f1
)
Coverity: Resource leak: CID 590
author
Nelson Ferreira
<nelson.ferreira@ieee.org>
Thu, 12 Jan 2012 15:14:34 +0000
(10:14 -0500)
committer
Nelson Ferreira
<nelson.ferreira@ieee.org>
Thu, 12 Jan 2012 15:14:34 +0000
(10:14 -0500)
* src/media/media-internal.c (media_internal_analyse_stream): free
data in the case of failed open.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
src/media/media-internal.c
patch
|
blob
|
history
diff --git
a/src/media/media-internal.c
b/src/media/media-internal.c
index
ac6c32a
..
e7a5c92
100644
(file)
--- a/
src/media/media-internal.c
+++ b/
src/media/media-internal.c
@@
-941,8
+941,10
@@
void media_internal_analyse_stream(Lisp_Media_Stream *ms)
mkfp = media_stream_kind_properties(ms).fprops;
TO_EXTERNAL_FORMAT(LISP_STRING, mkfp->filename,
ALLOCA, (file, file_len), Qnil);
- if ((fd = open(file, O_RDONLY, 0)) < 0)
+ if ((fd = open(file, O_RDONLY, 0)) < 0) {
+ xfree(data);
return;
+ }
/* take a data probe */
len = read(fd, data, 44);