aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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 );