diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2005-05-20 17:23:19 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2005-05-20 17:23:19 +0000 |
commit | 59e38454dfc5679329512dafd063ac43760c9ecd (patch) | |
tree | c5814a4446e7db6c8e9b7d703614da793e306370 /usr.bin/cvs/file.c | |
parent | d2f531f220f4624d5a7a354c94c7be554cc78fbb (diff) |
plug a memleak
Diffstat (limited to 'usr.bin/cvs/file.c')
-rw-r--r-- | usr.bin/cvs/file.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c index 9a0984f76c5..fcb129a3394 100644 --- a/usr.bin/cvs/file.c +++ b/usr.bin/cvs/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.74 2005/05/20 05:25:44 joris Exp $ */ +/* $OpenBSD: file.c,v 1.75 2005/05/20 17:23:18 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -428,8 +428,10 @@ cvs_file_getspec(char **fspec, int fsn, int flags, int (*cb)(CVSFILE *, void *), } } else { if (cb != NULL) { - if (cb(nf, arg) != CVS_EX_OK) + if (cb(nf, arg) != CVS_EX_OK) { + cvs_file_free(base); return (NULL); + } } } } |