diff options
author | Ray Lai <ray@cvs.openbsd.org> | 2006-05-29 21:17:45 +0000 |
---|---|---|
committer | Ray Lai <ray@cvs.openbsd.org> | 2006-05-29 21:17:45 +0000 |
commit | c521d6bd3158ca67c1f55cf4594caac9cff0caa0 (patch) | |
tree | 01b0ef9ab3f0c2c7bc99b658e585c6c452e0e236 /usr.bin/rcs/rcsprog.c | |
parent | cee4b29fca364eadc8171b9da31573acf0b879c7 (diff) |
Plug more memory leaks.
OK joris@
Diffstat (limited to 'usr.bin/rcs/rcsprog.c')
-rw-r--r-- | usr.bin/rcs/rcsprog.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/rcs/rcsprog.c b/usr.bin/rcs/rcsprog.c index 1d7bb00c2d7..dcb72fe07e6 100644 --- a/usr.bin/rcs/rcsprog.c +++ b/usr.bin/rcs/rcsprog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsprog.c,v 1.130 2006/05/28 23:16:31 ray Exp $ */ +/* $OpenBSD: rcsprog.c,v 1.131 2006/05/29 21:17:44 ray Exp $ */ /* * Copyright (c) 2005 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -238,6 +238,8 @@ rcs_main(int argc, char **argv) rcsflags |= RCSPROG_LFLAG; break; case 'm': + if (logstr != NULL) + xfree(logstr); logstr = xstrdup(rcs_optarg); break; case 'M': @@ -503,9 +505,6 @@ rcs_main(int argc, char **argv) (void)fprintf(stderr, "done\n"); } - if (logstr != NULL) - xfree(logstr); - return (0); } |