summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-10-31 12:56:25 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-10-31 12:56:25 +0000
commitd4020af479760130d81c1d608d27de96c43c7bd6 (patch)
tree979aa7b7bf64b2579b8517bfed2f3734ae67b85a /stream
parente5d852240715fb36e50d2792b5e45e9b76770719 (diff)
downloadmpv-d4020af479760130d81c1d608d27de96c43c7bd6.tar.bz2
mpv-d4020af479760130d81c1d608d27de96c43c7bd6.tar.xz
Avoid a memleak if allocation of field_name fails, fixes bug #1319.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27868 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream')
-rw-r--r--stream/http.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/stream/http.c b/stream/http.c
index 2a6d07aee0..21488907f7 100644
--- a/stream/http.c
+++ b/stream/http.c
@@ -550,6 +550,7 @@ http_set_field( HTTP_header_t *http_hdr, const char *field_name ) {
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 );