From 1560ebd3ff94a9d78a8e6a0f44a50c43e403e412 Mon Sep 17 00:00:00 2001 From: Mike Gelfand Date: Sun, 7 Dec 2014 10:42:12 +0000 Subject: [PATCH] Fix small memory leaks in crypto (base64) and rename (multi-file torrent) unit tests --- libtransmission/crypto-test.c | 4 ++++ libtransmission/rename-test.c | 1 + 2 files changed, 5 insertions(+) diff --git a/libtransmission/crypto-test.c b/libtransmission/crypto-test.c index 26b06867f..6474907cf 100644 --- a/libtransmission/crypto-test.c +++ b/libtransmission/crypto-test.c @@ -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 diff --git a/libtransmission/rename-test.c b/libtransmission/rename-test.c index aad099689..bc094428b 100644 --- a/libtransmission/rename-test.c +++ b/libtransmission/rename-test.c @@ -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); -- 2.40.0