patch 8.1.1186: readdir() allocates list twice

Problem:    readdir() allocates list twice.
Solution:   Remove second allocation.  Also check for zero length.
diff --git a/src/version.c b/src/version.c
index b08b22c..0b9a5df 100644
--- a/src/version.c
+++ b/src/version.c
@@ -772,6 +772,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1186,
+/**/
     1185,
 /**/
     1184,