From 3c65475561b25073c3b7dcbb0b6498a0535ecd59 Mon Sep 17 00:00:00 2001
From: nicm <nicm>
Date: Tue, 19 Jul 2022 06:46:57 +0000
Subject: [PATCH] Fix memory leak, from Gabriel Souza Franco.

---
 format.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/format.c b/format.c
index edf4217c..535af061 100644
--- a/format.c
+++ b/format.c
@@ -3564,12 +3564,12 @@ found:
 	}
 	if (modifiers & FORMAT_QUOTE_SHELL) {
 		saved = found;
-		found = xstrdup(format_quote_shell(saved));
+		found = format_quote_shell(saved);
 		free(saved);
 	}
 	if (modifiers & FORMAT_QUOTE_STYLE) {
 		saved = found;
-		found = xstrdup(format_quote_style(saved));
+		found = format_quote_style(saved);
 		free(saved);
 	}
 	return (found);