File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -641,7 +641,7 @@ static int request_handler_redirect(
641641 struct MHD_Connection * connection ,
642642 const char * target ) {
643643
644- char * page ;
644+ _cleanup_free_ char * page = NULL ;
645645 _cleanup_ (MHD_destroy_responsep ) struct MHD_Response * response = NULL ;
646646
647647 assert (connection );
@@ -651,10 +651,9 @@ static int request_handler_redirect(
651651 return respond_oom (connection );
652652
653653 response = MHD_create_response_from_buffer (strlen (page ), page , MHD_RESPMEM_MUST_FREE );
654- if (!response ) {
655- free (page );
654+ if (!response )
656655 return respond_oom (connection );
657- }
656+ TAKE_PTR ( page );
658657
659658 if (MHD_add_response_header (response , "Content-Type" , "text/html" ) == MHD_NO ||
660659 MHD_add_response_header (response , "Location" , target ) == MHD_NO )
You can’t perform that action at this time.
0 commit comments