From: nicm Date: Tue, 19 Jul 2022 06:46:57 +0000 (+0000) Subject: Fix memory leak, from Gabriel Souza Franco. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b5dea642dca4709e2d8bf436abe6b919952299cb;p=openbsd Fix memory leak, from Gabriel Souza Franco. --- diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c index 201f133136c..1e5eaf18f8c 100644 --- a/usr.bin/tmux/format.c +++ b/usr.bin/tmux/format.c @@ -1,4 +1,4 @@ -/* $OpenBSD: format.c,v 1.308 2022/07/06 07:36:36 nicm Exp $ */ +/* $OpenBSD: format.c,v 1.309 2022/07/19 06:46:57 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott @@ -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);