From 11bebdf23e4c2dd6015f949b65f802f36cedc06c Mon Sep 17 00:00:00 2001
From: lostd <lostd@2f30.org>
Date: Fri, 10 Oct 2014 13:24:19 +0300
Subject: [PATCH] The dirp should be initialized here

---
 noice.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/noice.c b/noice.c
index f224c964..5916fca0 100644
--- a/noice.c
+++ b/noice.c
@@ -555,11 +555,10 @@ out:
 		free(dents[i].name);
 	free(dents);
 
-	if (dirp != NULL) {
-		r = closedir(dirp);
-		if (r == -1)
-			printerr(1, "closedir");
-	}
+	/* Should never be null */
+	r = closedir(dirp);
+	if (r == -1)
+		printerr(1, "closedir");
 
 	goto begin;
 }
-- 
2.51.0