Mercurial > mplayer.hg
changeset 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 | 37ee8ca274b8 |
children | 28b6709b52a2 |
files | stream/http.c |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
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 );