diff options
author | 2005-05-20 17:23:18 +0000 | |
---|---|---|
committer | 2005-05-20 17:23:18 +0000 | |
commit | 6bda8108f8457c0adf860598b1ff6bef220df128 (patch) | |
tree | 2ade85ad87fe1ffef044ded85e2a60346900e645 /usr.bin/cvs/file.c | |
parent | * missing prototype for lookup() (diff) | |
download | wireguard-openbsd-6bda8108f8457c0adf860598b1ff6bef220df128.tar.xz wireguard-openbsd-6bda8108f8457c0adf860598b1ff6bef220df128.zip |
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); + } } } } |