projects
/
NetworkManager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4ffed27
)
cli: avoid using tmp template after it goes out of scope
author
Lubomir Rintel
<lkundrak@v3.sk>
Mon, 7 Dec 2015 10:05:50 +0000
(11:05 +0100)
committer
Lubomir Rintel
<lkundrak@v3.sk>
Mon, 7 Dec 2015 10:05:52 +0000
(11:05 +0100)
Fixes:
3892b839af4597c29ebff6d77666566dc4f94fb1
clients/cli/connections.c
patch
|
blob
|
history
diff --git
a/clients/cli/connections.c
b/clients/cli/connections.c
index
1cdfadf
..
da2e3f2
100644
(file)
--- a/
clients/cli/connections.c
+++ b/
clients/cli/connections.c
@@
-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);