소스 검색

use turn_free instead of free to fix memory leak in read_config_file

Thibaut Ackermann 7 년 전
부모
커밋
ea0eadabde
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/apps/relay/mainrelay.c

+ 1 - 1
src/apps/relay/mainrelay.c

@@ -1655,7 +1655,7 @@ static void read_config_file(int argc, char **argv, int pass)
 				config_file);
 
 		if (full_path_to_config_file) {
-			free(full_path_to_config_file);
+			turn_free(full_path_to_config_file, strlen(full_path_to_config_file)+1);
 			full_path_to_config_file = NULL;
 		}
 	}