summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/import.c
diff options
context:
space:
mode:
authorJean-Francois Brousseau <jfb@cvs.openbsd.org>2005-01-13 18:47:32 +0000
committerJean-Francois Brousseau <jfb@cvs.openbsd.org>2005-01-13 18:47:32 +0000
commit505c87f30d2175a2a9559c79f201525e81e1a400 (patch)
tree789bca433fd7a31687b152477905b5246ef34d5f /usr.bin/cvs/import.c
parentb29bac2a3324a0d53a17542cd9e922da954451ea (diff)
more widespread use of cvs_msg, and free it when we are done
diff by Joris Vink and me
Diffstat (limited to 'usr.bin/cvs/import.c')
-rw-r--r--usr.bin/cvs/import.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/cvs/import.c b/usr.bin/cvs/import.c
index 411db5f05ee..3f0949c979f 100644
--- a/usr.bin/cvs/import.c
+++ b/usr.bin/cvs/import.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: import.c,v 1.3 2005/01/06 19:56:38 jfb Exp $ */
+/* $OpenBSD: import.c,v 1.4 2005/01/13 18:47:31 jfb Exp $ */
/*
* Copyright (c) 2004 Joris Vink <amni@pandora.be>
* All rights reserved.
@@ -90,7 +90,11 @@ cvs_import(int argc, char **argv)
case 'k':
break;
case 'm':
- cvs_msg = optarg;
+ cvs_msg = strdup(optarg);
+ if (cvs_msg == NULL) {
+ cvs_log(LP_ERRNO, "failed to copy message");
+ return (EX_DATAERR);
+ }
break;
default:
return (EX_USAGE);