mirror of https://github.com/getdnsapi/getdns.git
Fixed memory leaks found within tests
This commit is contained in:
parent
5b9a09504a
commit
1856b6bb05
|
@ -302,6 +302,7 @@
|
|||
ck_assert_msg(callback_completed == even, "callback_completed should == %d, got: %d", even, callback_completed);
|
||||
ck_assert_msg(callback_canceled == odd, "callback_canceled should == %d, got: %d", odd, callback_canceled);
|
||||
|
||||
DICT_DESTROY(address);
|
||||
CONTEXT_DESTROY;
|
||||
}
|
||||
END_TEST
|
||||
|
|
|
@ -111,6 +111,7 @@
|
|||
GETDNS_RETURN_GOOD, "Return code from getdns_address()");
|
||||
|
||||
RUN_EVENT_LOOP;
|
||||
DICT_DESTROY(address);
|
||||
CONTEXT_DESTROY;
|
||||
|
||||
ck_assert_msg(callback_called == 1, "callback_called should == 1, got %d", callback_called);
|
||||
|
|
|
@ -190,6 +190,7 @@
|
|||
ck_assert_msg(sum == sum_of_values, "Sum of int values in dict should == %d, got: %d",
|
||||
sum_of_values, sum);
|
||||
|
||||
LIST_DESTROY(names);
|
||||
DICT_DESTROY(this_dict);
|
||||
DICT_DESTROY(second_dict);
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
int i;
|
||||
size_t length;
|
||||
struct getdns_bindata *key = NULL;
|
||||
char string_buffer[20];
|
||||
char string_buffer[20] = "";
|
||||
|
||||
DICT_CREATE(this_dict);
|
||||
|
||||
|
@ -84,6 +84,7 @@
|
|||
ck_assert_msg(strcmp(string_buffer, "elevententwelve") == 0,
|
||||
"Expected concatenated names to be \"elevententwelve\", got \"%s\"", string_buffer);
|
||||
|
||||
LIST_DESTROY(answer);
|
||||
DICT_DESTROY(this_dict);
|
||||
}
|
||||
END_TEST
|
||||
|
|
Loading…
Reference in New Issue