[libvirt PATCH] vsh: steal pointer in vshEditWriteToTempFile

Ján Tomko posted 1 patch 2 years, 8 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/4de7ccc4d87d3fee4a453a4fa89c81c82c1c643f.1628766716.git.jtomko@redhat.com
tools/vsh.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt PATCH] vsh: steal pointer in vshEditWriteToTempFile
Posted by Ján Tomko 2 years, 8 months ago
Fixes: 13896b5ad1d7f157273b6e49106df1f33958a9ed
Signed-off-by: Ján Tomko <jtomko@redhat.com>
---
Pushed as trivial. Ears of shame were applied.

 tools/vsh.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/vsh.c b/tools/vsh.c
index f9600bafba..96b3ced0ca 100644
--- a/tools/vsh.c
+++ b/tools/vsh.c
@@ -2377,7 +2377,7 @@ vshEditWriteToTempFile(vshControl *ctl, const char *doc)
     }
 
     /* Temporary filename: caller frees. */
-    return ret;
+    return g_steal_pointer(&ret);
 }
 
 /* Characters permitted in $EDITOR environment variable and temp filename. */
-- 
2.31.1