diff --git a/src/prompt.c b/src/prompt.c
index 8eb422a3998989479dd08da19aa50c5ea84cdb95..b902270dc09697002ff1996f703b327c1fae26cb 100644
--- a/src/prompt.c
+++ b/src/prompt.c
@@ -826,7 +826,10 @@ int statusq(bool allow_tabs, const shortcut *s, const char *curranswer,
     bool list = FALSE;
 #endif
 
-    assert(prompt == NULL);
+    /* prompt has been freed and set to NULL unless the user resized
+     * while at the statusbar prompt. */
+    if (prompt != NULL)
+	free(prompt);
 
     prompt = charalloc(((COLS - 4) * mb_cur_max()) + 1);