Blame SOURCES/0007-Fix-memory-leak-in-test_check_nt_time_string_lifetim.patch

7ddab3
From 3d312a6c89a88be444fb5ed768fbaa6155bf1cc9 Mon Sep 17 00:00:00 2001
7ddab3
From: Sumit Bose <sbose@redhat.com>
7ddab3
Date: Tue, 30 Jan 2018 14:39:46 +0100
7ddab3
Subject: [PATCH 07/23] Fix memory leak in test_check_nt_time_string_lifetime
7ddab3
7ddab3
The test added with 650e5d33ef31437a049fb454ad3dc5457c56abe7 introduced
7ddab3
a small memory leak.
7ddab3
7ddab3
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
7ddab3
---
7ddab3
 library/adutil.c | 1 +
7ddab3
 1 file changed, 1 insertion(+)
7ddab3
7ddab3
diff --git a/library/adutil.c b/library/adutil.c
7ddab3
index 21ccd27..cd40f45 100644
7ddab3
--- a/library/adutil.c
7ddab3
+++ b/library/adutil.c
7ddab3
@@ -501,6 +501,7 @@ test_check_nt_time_string_lifetime (void)
7ddab3
 			  (time (NULL) + 10 + AD_TO_UNIX_TIME_CONST) * 1000 * 1000 *10)
7ddab3
 		!= -1);
7ddab3
 	assert (!_adcli_check_nt_time_string_lifetime (time_str, 0));
7ddab3
+	free (time_str);
7ddab3
 
7ddab3
 	/* This test will fail some time after 2200AD as a reminder to reflect
7ddab3
 	 * why adcli is still needed. */
7ddab3
-- 
7ddab3
2.14.4
7ddab3