Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/tic fix leak.



details:   https://anonhg.NetBSD.org/src/rev/f32a8b80b764
branches:  trunk
changeset: 819264:f32a8b80b764
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Nov 24 17:12:23 2016 +0000

description:
fix leak.

diffstat:

 usr.bin/tic/tic.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r f312d9ce8965 -r f32a8b80b764 usr.bin/tic/tic.c
--- a/usr.bin/tic/tic.c Thu Nov 24 17:09:55 2016 +0000
+++ b/usr.bin/tic/tic.c Thu Nov 24 17:12:23 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tic.c,v 1.25 2016/02/24 12:01:44 roy Exp $ */
+/* $NetBSD: tic.c,v 1.26 2016/11/24 17:12:23 christos Exp $ */
 
 /*
  * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: tic.c,v 1.25 2016/02/24 12:01:44 roy Exp $");
+__RCSID("$NetBSD: tic.c,v 1.26 2016/11/24 17:12:23 christos Exp $");
 
 #include <sys/types.h>
 #include <sys/queue.h>
@@ -110,6 +110,7 @@
                memcpy(buf + 7, term->name, slen);
                if (cdbw_put(db, term->name, slen, buf, len))
                        err(1, "cdbw_put");
+               free(buf);
                return 0;
        }
 



Home | Main Index | Thread Index | Old Index