31 Oct
2008
31 Oct
'08
3:56 p.m.
Author: reimar Date: Fri Oct 31 13:56:25 2008 New Revision: 27868 Log: Avoid a memleak if allocation of field_name fails, fixes bug #1319. Modified: trunk/stream/http.c Modified: trunk/stream/http.c ============================================================================== --- trunk/stream/http.c (original) +++ trunk/stream/http.c Fri Oct 31 13:56:25 2008 @@ -550,6 +550,7 @@ http_set_field( HTTP_header_t *http_hdr, 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 );
6582
Age (days ago)
6582
Last active (days ago)
0 comments
1 participants
participants (1)
-
reimar