Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michael Telatynski
Olm
Commits
be0c3189
Commit
be0c3189
authored
Oct 01, 2020
by
Lukas Lihotzki
Browse files
fix memory leaks in tests
parent
73a9ced6
Changes
2
Show whitespace changes
Inline
Side-by-side
tests/test_olm_signature.cpp
View file @
be0c3189
...
...
@@ -69,6 +69,9 @@ assert_not_equals(std::size_t(-1), ::olm_account_identity_keys(
account
,
id_keys
,
id_keys_size
));
olm_clear_account
(
account
);
free
(
account_buffer
);
void
*
utility_buffer
=
check_malloc
(
::
olm_utility_size
());
::
OlmUtility
*
utility
=
::
olm_utility
(
utility_buffer
);
...
...
@@ -76,6 +79,13 @@ assert_not_equals(std::size_t(-1), ::olm_ed25519_verify(
utility
,
id_keys
+
71
,
43
,
message
,
message_size
,
signature
,
signature_size
));
olm_clear_utility
(
utility
);
free
(
utility_buffer
);
free
(
id_keys
);
free
(
signature
);
free
(
message
);
}
}
tests/test_pk.cpp
View file @
be0c3189
...
...
@@ -224,6 +224,9 @@ result = ::olm_ed25519_verify(
assert_equals
((
size_t
)
-
1
,
result
);
olm_clear_utility
(
utility
);
free
(
utility_buffer
);
free
(
message
);
free
(
sig_buffer
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment