patch 9.0.0820: memory leak with empty shell command

Problem:    Memory leak with empty shell command.
Solution:   Free the empty string.
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 44333d5..7bb7aa0 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -957,12 +957,15 @@
 	}
     } while (trailarg != NULL);
 
-    // Don't clear "prevcmd" if there is no command to run.
+    // Only set "prevcmd" if there is a command to run, otherwise keep te one
+    // we have.
     if (STRLEN(newcmd) > 0)
     {
 	vim_free(prevcmd);
 	prevcmd = newcmd;
     }
+    else
+	free_newcmd = TRUE;
 
     if (bangredo)	    // put cmd in redo buffer for ! command
     {
@@ -986,6 +989,8 @@
      */
     if (*p_shq != NUL)
     {
+	if (free_newcmd)
+	    vim_free(newcmd);
 	newcmd = alloc(STRLEN(prevcmd) + 2 * STRLEN(p_shq) + 1);
 	if (newcmd == NULL)
 	    return;