session-helper: Avoid a memory leak

Apply the fix suggested more than a year ago in:

  https://github.com/flatpak/flatpak/issues/5821#issuecomment-2121673464

Signed-off-by: Martin Schwenke <martin@meltin.net>

Fixes: https://github.com/flatpak/flatpak/issues/5821
(cherry picked from commit cd80e843435df5ce70d9a2b6710098135ceb9085)
This commit is contained in:
Martin Schwenke 2025-07-20 15:30:10 +10:00 committed by bbhtt
parent 378cb66230
commit d02c0bbec5

View File

@ -215,7 +215,7 @@ handle_host_command (FlatpakDevelopment *object,
gsize i, j, n_fds, n_envs;
const gint *fds;
g_autofree FdMapEntry *fd_map = NULL;
gchar **env;
g_auto(GStrv) env = NULL;
gint32 max_fd;
if (*arg_cwd_path == 0)