summaryrefslogtreecommitdiff
path: root/tempfile.c
diff options
context:
space:
mode:
authorClint Adams <schizo@debian.org>2009-03-23 20:50:38 -0400
committerClint Adams <schizo@debian.org>2009-03-23 20:50:38 -0400
commit8177451d9f10fbaffcbd215ccd7854c094d812ff (patch)
tree03ff4c0b64ea66462073e7fdcd142fb49328cd39 /tempfile.c
parente4e6f4b4ae94fe15790186922f98d01578bc6422 (diff)
downloaddebianutils-8177451d9f10fbaffcbd215ccd7854c094d812ff.tar.gz
tempfile.c: patch from Ryan Niebur to fix breakage of -n option. closes: #520940.
Diffstat (limited to 'tempfile.c')
-rw-r--r--tempfile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tempfile.c b/tempfile.c
index afefb48..11e46cc 100644
--- a/tempfile.c
+++ b/tempfile.c
@@ -91,7 +91,9 @@ main (int argc, char **argv)
}
break;
case 'n':
- name = optarg;
+ // strdup because it is freed later on
+ if((name = strdup(optarg)) == NULL)
+ syserror("strdup");
break;
case 'h':
usage(0);