summaryrefslogtreecommitdiff
path: root/usr.bin/rcs/ci.c
diff options
context:
space:
mode:
authorRay Lai <ray@cvs.openbsd.org>2006-05-29 21:17:45 +0000
committerRay Lai <ray@cvs.openbsd.org>2006-05-29 21:17:45 +0000
commitc521d6bd3158ca67c1f55cf4594caac9cff0caa0 (patch)
tree01b0ef9ab3f0c2c7bc99b658e585c6c452e0e236 /usr.bin/rcs/ci.c
parentcee4b29fca364eadc8171b9da31573acf0b879c7 (diff)
Plug more memory leaks.
OK joris@
Diffstat (limited to 'usr.bin/rcs/ci.c')
-rw-r--r--usr.bin/rcs/ci.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/rcs/ci.c b/usr.bin/rcs/ci.c
index 9705296be35..df948b94b1d 100644
--- a/usr.bin/rcs/ci.c
+++ b/usr.bin/rcs/ci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ci.c,v 1.176 2006/05/29 02:58:16 niallo Exp $ */
+/* $OpenBSD: ci.c,v 1.177 2006/05/29 21:17:44 ray Exp $ */
/*
* Copyright (c) 2005, 2006 Niall O'Higgins <niallo@openbsd.org>
* All rights reserved.
@@ -63,8 +63,9 @@ struct checkin_params {
time_t date;
RCSFILE *file;
RCSNUM *frev, *newrev;
+ const char *description, *symbol;
char fpath[MAXPATHLEN], *rcs_msg, *username, *deltatext, *filename;
- char *author, *description, *state, *symbol;
+ char *author, *state;
};
static int checkin_attach_symbol(struct checkin_params *);
@@ -108,7 +109,8 @@ checkin_main(int argc, char **argv)
pb.date = DATE_NOW;
pb.file = NULL;
pb.rcs_msg = pb.username = pb.author = pb.state = NULL;
- pb.symbol = pb.description = pb.deltatext = NULL;
+ pb.description = pb.symbol = NULL;
+ pb.deltatext = NULL;
pb.newrev = NULL;
pb.flags = status = 0;
pb.fmode = S_IRUSR|S_IRGRP|S_IROTH;
@@ -164,9 +166,7 @@ checkin_main(int argc, char **argv)
pb.flags |= CI_SYMFORCE;
/* FALLTHROUGH */
case 'n':
- if (pb.symbol != NULL)
- xfree(pb.symbol);
- pb.symbol = xstrdup(rcs_optarg);
+ pb.symbol = rcs_optarg;
if (rcs_sym_check(pb.symbol) != 1)
errx(1, "invalid symbol `%s'", pb.symbol);
break;