diff options
author | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2006-06-18 20:41:25 +0000 |
---|---|---|
committer | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2006-06-18 20:41:25 +0000 |
commit | aa67bcab358d297b9cc615d4fb833a6c5668a44c (patch) | |
tree | 9b6aeef783d05248805e62131a099f4c77fa42a3 | |
parent | c8a0f869574b249a47f4c4e346f6ee8199e34aa3 (diff) |
Fix memleak; From Coverity Scan, CID 3135.
From simonb NetBSD
ok naddy@, otto@
-rw-r--r-- | usr.bin/vi/common/exf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/vi/common/exf.c b/usr.bin/vi/common/exf.c index 64fe61249a5..29f78837b40 100644 --- a/usr.bin/vi/common/exf.c +++ b/usr.bin/vi/common/exf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exf.c,v 1.22 2006/01/08 21:05:39 miod Exp $ */ +/* $OpenBSD: exf.c,v 1.23 2006/06/18 20:41:24 jasper Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -174,8 +174,10 @@ file_init(sp, frp, rcv_name, flags) * Scan the user's path to find the file that we're going to * try and open. */ - if (file_spath(sp, frp, &sb, &exists)) + if (file_spath(sp, frp, &sb, &exists)) { + free(ep); return (1); + } /* * If no name or backing file, for whatever reason, create a backing |