Coverity CI D3758: Plug memory leak.
This commit is contained in:
parent
19d4b5c5e9
commit
236f8aef2c
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: var.c,v 1.109 2006/05/19 17:27:06 christos Exp $ */
|
||||
/* $NetBSD: var.c,v 1.110 2006/05/19 17:29:01 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990, 1993
|
||||
|
@ -69,14 +69,14 @@
|
|||
*/
|
||||
|
||||
#ifndef MAKE_NATIVE
|
||||
static char rcsid[] = "$NetBSD: var.c,v 1.109 2006/05/19 17:27:06 christos Exp $";
|
||||
static char rcsid[] = "$NetBSD: var.c,v 1.110 2006/05/19 17:29:01 christos Exp $";
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: var.c,v 1.109 2006/05/19 17:27:06 christos Exp $");
|
||||
__RCSID("$NetBSD: var.c,v 1.110 2006/05/19 17:29:01 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
#endif
|
||||
|
@ -3117,6 +3117,7 @@ Var_Parse(const char *str, GNode *ctxt, Boolean err, int *lengthPtr,
|
|||
* the end of the string, since that's what make does.
|
||||
*/
|
||||
*lengthPtr = tstr - str;
|
||||
Buf_Destroy(buf, TRUE);
|
||||
return (var_Error);
|
||||
}
|
||||
*WR(tstr) = '\0';
|
||||
|
|
Loading…
Reference in New Issue