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) {
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 );
......
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