fix: memory leak
This commit is contained in:
		
							parent
							
								
									5e64f5963c
								
							
						
					
					
						commit
						3acea7fc2f
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -247,6 +247,7 @@ api_v1_schedules_STR_PUT(struct http_message *hm, endpoint_args_t *args, endpoin
 | 
			
		|||
        response->alloced_content = true;
 | 
			
		||||
    }
 | 
			
		||||
    cJSON_Delete(json);
 | 
			
		||||
    relay_free_list(relays);
 | 
			
		||||
    schedule_free(schedule);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -294,6 +295,8 @@ api_v1_schedules_STR_DELETE(struct http_message *hm, endpoint_args_t *args, endp
 | 
			
		|||
        response->content_length = STRLEN(content);;
 | 
			
		||||
        response->content = content;
 | 
			
		||||
        response->alloced_content = false;
 | 
			
		||||
 | 
			
		||||
        schedule_free(schedule);
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue