[vlc-devel] commit: Fix mem leak (Christophe Mutricy )
git version control
git at videolan.org
Sat Nov 22 19:12:43 CET 2008
vlc | branch: 0.9-bugfix | Christophe Mutricy <xtophe at videolan.org> | Sat Nov 22 16:04:24 2008 +0000| [d4e58af37b4c3047a42ac4297b8a03979db706b8] | committer: Christophe Mutricy
Fix mem leak
Closes #2305
(cherry picked from commit aa79a7b23841cd0a7b7ac8c4426ba191d5115e01)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d4e58af37b4c3047a42ac4297b8a03979db706b8
---
modules/access/rtsp/real_sdpplin.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/access/rtsp/real_sdpplin.c b/modules/access/rtsp/real_sdpplin.c
index 229501c..be950c2 100644
--- a/modules/access/rtsp/real_sdpplin.c
+++ b/modules/access/rtsp/real_sdpplin.c
@@ -231,16 +231,18 @@ sdpplin_t *sdpplin_parse(char *data) {
sdpplin_t *desc = malloc(sizeof(sdpplin_t));
sdpplin_stream_t *stream;
- char *buf=malloc(BUFLEN);
- char *decoded=malloc(BUFLEN);
+ char *buf=NULL;
+ char *decoded=NULL;
int handled;
int len;
if( !desc ) return NULL;
+ buf = malloc(BUFLEN);
if( !buf ) {
free( desc );
return NULL;
}
+ decoded = malloc(BUFLEN);
if( !decoded ) {
free( buf );
free( desc );
More information about the vlc-devel
mailing list