Explorar el Código

Fix memory leak in test args

Andrii Doroshenko (Xrayez) hace 5 años
padre
commit
db1259ac70
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      tests/test_main.cpp

+ 3 - 0
tests/test_main.cpp

@@ -84,6 +84,9 @@ int test_main(int argc, char *argv[]) {
 	test_context.setOption("abort-after", 5);
 	test_context.setOption("no-breaks", true);
 
+	for (int x = 0; x < valid_arguments.size(); x++) {
+		delete[] args[x];
+	}
 	delete[] args;
 
 	return test_context.run();