Commit aa79a7b2 authored by Christophe Mutricy's avatar Christophe Mutricy

Fix mem leak

Closes #2305
parent d6f0bd78
...@@ -231,16 +231,18 @@ sdpplin_t *sdpplin_parse(char *data) { ...@@ -231,16 +231,18 @@ sdpplin_t *sdpplin_parse(char *data) {
sdpplin_t *desc = malloc(sizeof(sdpplin_t)); sdpplin_t *desc = malloc(sizeof(sdpplin_t));
sdpplin_stream_t *stream; sdpplin_stream_t *stream;
char *buf=malloc(BUFLEN); char *buf=NULL;
char *decoded=malloc(BUFLEN); char *decoded=NULL;
int handled; int handled;
int len; int len;
if( !desc ) return NULL; if( !desc ) return NULL;
buf = malloc(BUFLEN);
if( !buf ) { if( !buf ) {
free( desc ); free( desc );
return NULL; return NULL;
} }
decoded = malloc(BUFLEN);
if( !decoded ) { if( !decoded ) {
free( buf ); free( buf );
free( desc ); free( desc );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment