summaryrefslogtreecommitdiff
path: root/tempfile.c
diff options
context:
space:
mode:
authorClint Adams <schizo@debian.org>2009-05-04 18:55:30 -0400
committerClint Adams <schizo@debian.org>2009-05-04 18:55:30 -0400
commit7704587e4300eb07462db11abb1b409a695e91d7 (patch)
treee70bef84832e66e1f5c02b272e21cfd60d876480 /tempfile.c
parentaeb47f24e0d3158e7d41163bb8f28e5ca1ecc698 (diff)
downloaddebianutils-7704587e4300eb07462db11abb1b409a695e91d7.tar.gz
Patch from Zack Weinberg to fix tempfile -n crash. closes: #526981.
Diffstat (limited to 'tempfile.c')
-rw-r--r--tempfile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tempfile.c b/tempfile.c
index 1ac7130..1029629 100644
--- a/tempfile.c
+++ b/tempfile.c
@@ -112,6 +112,7 @@ main (int argc, char **argv)
if (name) {
if ((fd = open(name, O_RDWR | O_CREAT | O_EXCL, mode)) < 0)
syserror("open");
+ filename = name;
}
else {
for (;;) {