add: schedule tags endpoint
fix: memory leak for string args
This commit is contained in:
		
							parent
							
								
									a127a68e31
								
							
						
					
					
						commit
						f040cd8b21
					
				
					 6 changed files with 71 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -16,6 +16,14 @@ handler_connection(struct mg_connection *c, int ev, void *p)
 | 
			
		|||
        if(endpoint && endpoint->func)
 | 
			
		||||
        {
 | 
			
		||||
            endpoint->func(c, endpoint->args, p);
 | 
			
		||||
 | 
			
		||||
            for(int i = 0; i < endpoint->args_count; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                if(endpoint->args[i].type == ENDPOINT_ARG_TYPE_STR)
 | 
			
		||||
                {
 | 
			
		||||
                    free((char*)endpoint->args[i].value.v_str);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue