diff --git a/src/global.c b/src/global.c
index a9345cb25dc32dd15ecbe567a5f4731be4dde5b3..527bd9e0b59bc4d7686a9ccd0992f142040ed7b4 100644
--- a/src/global.c
+++ b/src/global.c
@@ -1850,9 +1850,10 @@ void thanks_for_all_the_fish(void)
     }
 #endif /* !DISABLE_COLOR */
 #ifdef ENABLE_HISTORIES
-    /* Free the search and replace history lists. */
+    /* Free the search, replace, and execute history lists. */
     free_filestruct(searchtop);
     free_filestruct(replacetop);
+    free_filestruct(executetop);
 #endif
     /* Free the list of functions. */
     while (allfuncs != NULL) {
@@ -1866,8 +1867,6 @@ void thanks_for_all_the_fish(void)
 	sclist = sclist->next;
 	free(s);
     }
-#ifdef ENABLE_NANORC
     free(homedir);
-#endif
 }
 #endif /* DEBUG */
diff --git a/src/history.c b/src/history.c
index 64d9d028e6caf2b3ae5b1dbe6ef9cab070eefacc..1a9f1225fafd7326f69e38ea6a2450b20c449e67 100644
--- a/src/history.c
+++ b/src/history.c
@@ -294,9 +294,9 @@ void load_history(void)
 			strerror(errno));
 	}
     } else {
-	/* Load the two history lists -- first the search history, then
-	 * the replace history -- from the oldest entry to the newest.
-	 * The two lists are separated by an empty line. */
+	/* Load the three history lists -- first search, then replace,
+	 * then execute -- from oldest entry to newest.  Between two
+	 * lists there is an empty line. */
 	filestruct **history = &search_history;
 	char *line = NULL;
 	size_t buf_len = 0;
diff --git a/src/rcfile.c b/src/rcfile.c
index e47ab2b8e5166a9e612c886c6d2b33cf4621fa2e..0c9b8ab5412195d6e82fa255e5036ec3e4d0ea0e 100644
--- a/src/rcfile.c
+++ b/src/rcfile.c
@@ -872,7 +872,6 @@ void pick_up_name(const char *kind, char *ptr, char **storage)
     }
 
     *storage = mallocstrcpy(*storage, ptr);
-
 }
 #endif /* !DISABLE_COLOR */