summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2023-02-06 16:09:29 +0000
committerSimon McVittie <smcv@collabora.com>2023-02-07 14:03:47 +0000
commit64d627968eacc3e93b7bde2ecbded7179f18e14d (patch)
treefae8f01ac5554e1cf989535e3f4bc67e86ffa696 /common
parentb13d387aef3be7f4f1c538762576d5b7ef26c47f (diff)
downloadflatpak-64d627968eacc3e93b7bde2ecbded7179f18e14d.tar.gz
run: Avoid double-free of gpgconf stdout stream
g_subprocess_get_stdout_pipe() does not transfer ownership, so the stream still belongs to the GSubprocess and we must not unref it. Fixes: 764e5a4d "Add --socket=gpg-agent" Resolves: https://github.com/flatpak/flatpak/issues/5095 Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'common')
-rw-r--r--common/flatpak-run.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/flatpak-run.c b/common/flatpak-run.c
index 8d613165..3c85f922 100644
--- a/common/flatpak-run.c
+++ b/common/flatpak-run.c
@@ -608,7 +608,7 @@ flatpak_run_add_gpg_agent_args (FlatpakBwrap *bwrap)
g_autofree char * sandbox_agent_socket = NULL;
g_autoptr(GError) gpgconf_error = NULL;
g_autoptr(GSubprocess) process = NULL;
- g_autoptr(GInputStream) base_stream = NULL;
+ GInputStream *base_stream = NULL;
g_autoptr(GDataInputStream) data_stream = NULL;
process = g_subprocess_new (G_SUBPROCESS_FLAGS_STDOUT_PIPE,