Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/external/bsd/libsaslc/dist/src Fixed memory leak on c...
details: https://anonhg.NetBSD.org/src/rev/5476da9272c4
branches: trunk
changeset: 809897:5476da9272c4
user: shm <shm%NetBSD.org@localhost>
date: Sat Aug 08 12:34:33 2015 +0000
description:
Fixed memory leak on comments
diffstat:
crypto/external/bsd/libsaslc/dist/src/parser.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r fb2f2ccb07e4 -r 5476da9272c4 crypto/external/bsd/libsaslc/dist/src/parser.c
--- a/crypto/external/bsd/libsaslc/dist/src/parser.c Sat Aug 08 12:02:35 2015 +0000
+++ b/crypto/external/bsd/libsaslc/dist/src/parser.c Sat Aug 08 12:34:33 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parser.c,v 1.4 2011/02/12 23:21:32 christos Exp $ */
+/* $NetBSD: parser.c,v 1.5 2015/08/08 12:34:33 shm Exp $ */
/* Copyright (c) 2010 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -35,7 +35,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: parser.c,v 1.4 2011/02/12 23:21:32 christos Exp $");
+__RCSID("$NetBSD: parser.c,v 1.5 2015/08/08 12:34:33 shm Exp $");
#include <sys/stat.h>
#include <sys/syslimits.h> /* for PATH_MAX */
@@ -186,8 +186,10 @@
key = NULL;
while ((t = saslc__parse_get_token(&line)) != NULL) {
- if (t->type == TOKEN_COMMENT)
+ if (t->type == TOKEN_COMMENT) {
+ free(t);
break;
+ }
if (key == NULL) { /* get the key */
if (t->type != TOKEN_KEY)
Home |
Main Index |
Thread Index |
Old Index