[PATCH 2/7] Free mem allocate by scandir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Angus Salkeld <asalkeld@xxxxxxxxxx>
---
 lcr/lcr_ifact.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/lcr/lcr_ifact.c b/lcr/lcr_ifact.c
index fc14f8c..b3d441b 100644
--- a/lcr/lcr_ifact.c
+++ b/lcr/lcr_ifact.c
@@ -239,9 +239,14 @@ static int ldso_path_build (const char *path, const char *filename)
 		} else {
 			for (j = 0; j < scandir_entries; j++) {
 				ldso_path_build (path, scandir_list[j]->d_name);
+				free(scandir_list[j]);
 			}
 		}
 	}
+#if defined (COROSYNC_SOLARIS) && !defined(HAVE_SCANDIR)
+#else
+	free(scandir_list);
+#endif
 
 	fp = fopen (filename_cat, "r");
 	if (fp == NULL) {
-- 
1.7.7

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss


[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux