Mercurial > mplayer.hg
diff stream/http.c @ 27834:d35bcab9833b
Avoid a memleak if allocation of field_name fails, fixes bug #1319.
| author | reimar |
|---|---|
| date | Fri, 31 Oct 2008 12:56:25 +0000 |
| parents | ae5da477539e |
| children | 28deb37052cd |
line wrap: on
line diff
--- a/stream/http.c Thu Oct 30 22:40:55 2008 +0000 +++ b/stream/http.c Fri Oct 31 12:56:25 2008 +0000 @@ -550,6 +550,7 @@ new_field->field_name = malloc(strlen(field_name)+1); if( new_field->field_name==NULL ) { mp_msg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed\n"); + free(new_field); return; } strcpy( new_field->field_name, field_name );
