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
|
* Copyright (c) 1988, 1989, 1990, 1993
|
||||||
|
@ -69,14 +69,14 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MAKE_NATIVE
|
#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
|
#else
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
|
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
|
||||||
#else
|
#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
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
#endif
|
#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.
|
* the end of the string, since that's what make does.
|
||||||
*/
|
*/
|
||||||
*lengthPtr = tstr - str;
|
*lengthPtr = tstr - str;
|
||||||
|
Buf_Destroy(buf, TRUE);
|
||||||
return (var_Error);
|
return (var_Error);
|
||||||
}
|
}
|
||||||
*WR(tstr) = '\0';
|
*WR(tstr) = '\0';
|
||||||
|
|
Loading…
Reference in New Issue