Browse Source

klish: Fix faux_error memory leak

Serj Kalichev 2 months ago
parent
commit
fd80a3dc1e
1 changed files with 3 additions and 1 deletions
  1. 3 1
      bin/klish/interactive.c

+ 3 - 1
bin/klish/interactive.c

@@ -126,8 +126,10 @@ static bool_t tinyrl_key_enter(tinyrl_t *tinyrl, unsigned char key)
 
 	line = tinyrl_line(tinyrl);
 	// Don't do anything on empty line
-	if (faux_str_is_empty(line))
+	if (faux_str_is_empty(line)) {
+		faux_error_free(error);
 		return BOOL_TRUE;
+	}
 
 	ktp_session_cmd(ctx->ktp, line, error, ctx->opts->dry_run);