mirror of
https://github.com/transmission/transmission
synced 2024-12-25 01:03:01 +00:00
Fix small memory leaks in crypto (base64) and rename (multi-file torrent) unit tests
This commit is contained in:
parent
b9d844b166
commit
1560ebd3ff
2 changed files with 5 additions and 0 deletions
|
@ -202,16 +202,20 @@ test_base64 (void)
|
|||
out = tr_base64_encode ("", 0, &len);
|
||||
check_int_eq (0, len);
|
||||
check_streq ("", out);
|
||||
tr_free (out);
|
||||
out = tr_base64_decode ("", 0, &len);
|
||||
check_int_eq (0, len);
|
||||
check_streq ("", out);
|
||||
tr_free (out);
|
||||
|
||||
out = tr_base64_encode (NULL, 0, &len);
|
||||
check_int_eq (0, len);
|
||||
check (out == NULL);
|
||||
tr_free (out);
|
||||
out = tr_base64_decode (NULL, 0, &len);
|
||||
check_int_eq (0, len);
|
||||
check (out == NULL);
|
||||
tr_free (out);
|
||||
|
||||
#define MAX_BUF_SIZE 1024
|
||||
|
||||
|
|
|
@ -441,6 +441,7 @@ test_multifile_torrent (void)
|
|||
*** Test renaming prefixes (shouldn't work)
|
||||
**/
|
||||
|
||||
tr_ctorFree (ctor);
|
||||
tr_torrentRemove (tor, false, NULL);
|
||||
do {
|
||||
tr_wait_msec (10);
|
||||
|
|
Loading…
Reference in a new issue