diff options
author | Niall O'Higgins <niallo@cvs.openbsd.org> | 2006-04-01 13:57:49 +0000 |
---|---|---|
committer | Niall O'Higgins <niallo@cvs.openbsd.org> | 2006-04-01 13:57:49 +0000 |
commit | 01cf5512e446ba33aabff2cf25e84a238f8b0ffe (patch) | |
tree | f4c2f6ecdb3f075db139e503d55d0a9dd6939eae /usr.bin/rcs/ci.c | |
parent | 070f7f69e4f701be8b4bc0a561e9ab61992f8e2b (diff) |
- plug a possible memory leak in checkin_update() error path.
ok joris@
Diffstat (limited to 'usr.bin/rcs/ci.c')
-rw-r--r-- | usr.bin/rcs/ci.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/rcs/ci.c b/usr.bin/rcs/ci.c index cf254aee02c..451adcfabde 100644 --- a/usr.bin/rcs/ci.c +++ b/usr.bin/rcs/ci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ci.c,v 1.133 2006/03/31 01:39:36 joris Exp $ */ +/* $OpenBSD: ci.c,v 1.134 2006/04/01 13:57:48 niallo Exp $ */ /* * Copyright (c) 2005, 2006 Niall O'Higgins <niallo@openbsd.org> * All rights reserved. @@ -109,7 +109,7 @@ 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 = NULL; + pb.symbol = pb.description = pb.deltatext = NULL; pb.newrev = NULL; pb.flags = status = 0; pb.fmode = S_IRUSR|S_IRGRP|S_IROTH; @@ -618,6 +618,8 @@ checkin_update(struct checkin_params *pb) fail: xfree(filec); + if (pb->deltatext != NULL) + xfree(pb->deltatext); return (-1); } |