mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 01:30:16 +01:00
cli: avoid using tmp template after it goes out of scope
Fixes: 3892b839af
This commit is contained in:
parent
4ffed27959
commit
b38a5f4cb4
1 changed files with 1 additions and 1 deletions
|
|
@ -10146,6 +10146,7 @@ do_connection_export (NmCli *nmc, int argc, char **argv)
|
|||
const char *type = NULL;
|
||||
NMVpnEditorPlugin *plugin;
|
||||
GError *error = NULL;
|
||||
char tmpfile[] = "/tmp/nmcli-export-temp-XXXXXX";
|
||||
|
||||
if (argc == 0) {
|
||||
if (nmc->ask) {
|
||||
|
|
@ -10214,7 +10215,6 @@ do_connection_export (NmCli *nmc, int argc, char **argv)
|
|||
path = out_name;
|
||||
else {
|
||||
int fd;
|
||||
char tmpfile[] = "/tmp/nmcli-export-temp-XXXXXX";
|
||||
fd = g_mkstemp (tmpfile);
|
||||
if (fd == -1) {
|
||||
g_string_printf (nmc->return_text, _("Error: failed to create temporary file %s."), tmpfile);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue