Fixed memory leak reported by valgrind
Этот коммит содержится в:
родитель
47d11734e1
Коммит
80408d5357
@ -14,11 +14,14 @@
|
|||||||
#define NUM_THREADS 100
|
#define NUM_THREADS 100
|
||||||
|
|
||||||
static void setup(){
|
static void setup(){
|
||||||
printf("setup\n");
|
|
||||||
ssh_threads_set_callbacks(ssh_threads_get_pthread());
|
ssh_threads_set_callbacks(ssh_threads_get_pthread());
|
||||||
ssh_init();
|
ssh_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void teardown(){
|
||||||
|
ssh_finalize();
|
||||||
|
}
|
||||||
|
|
||||||
static void *torture_rand_thread(void *threadid){
|
static void *torture_rand_thread(void *threadid){
|
||||||
char buffer[12];
|
char buffer[12];
|
||||||
int i;
|
int i;
|
||||||
@ -52,7 +55,7 @@ END_TEST
|
|||||||
Suite *torture_make_suite(void) {
|
Suite *torture_make_suite(void) {
|
||||||
Suite *s = suite_create("torture_rand");
|
Suite *s = suite_create("torture_rand");
|
||||||
|
|
||||||
torture_create_case_fixture(s, "torture_rand_threading", torture_rand_threading,setup,NULL);
|
torture_create_case_fixture(s, "torture_rand_threading", torture_rand_threading,setup,teardown);
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user