Coverity CID 3684: memory leak

This commit is contained in:
jnemeth 2006-05-27 04:55:14 +00:00
parent 243d02dab5
commit 6222f021a3
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: v_replace.c,v 1.9 2002/04/09 01:47:35 thorpej Exp $ */
/* $NetBSD: v_replace.c,v 1.10 2006/05/27 04:55:14 jnemeth Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@ -16,7 +16,7 @@
#if 0
static const char sccsid[] = "@(#)v_replace.c 10.17 (Berkeley) 6/30/96";
#else
__RCSID("$NetBSD: v_replace.c,v 1.9 2002/04/09 01:47:35 thorpej Exp $");
__RCSID("$NetBSD: v_replace.c,v 1.10 2006/05/27 04:55:14 jnemeth Exp $");
#endif
#endif /* not lint */
@ -194,6 +194,7 @@ next: if (v_event_get(sp, &ev, 0, 0))
vp->m_stop.cno = tp->ai ? tp->ai - 1 : 0;
if (db_append(sp, 1, vp->m_start.lno, tp->lb, tp->len))
text_free(tp);
err_ret: rval = 1;
else {
text_free(tp);