Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/net Remove entirely redundant free right after decl...



details:   https://anonhg.NetBSD.org/src/rev/127b1b701229
branches:  trunk
changeset: 822271:127b1b701229
user:      maya <maya%NetBSD.org@localhost>
date:      Fri Mar 10 18:02:32 2017 +0000

description:
Remove entirely redundant free right after declaration.

This block existed because the original code used bindname as a global.

diffstat:

 lib/libc/net/hesiod.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r ba6c12709a40 -r 127b1b701229 lib/libc/net/hesiod.c
--- a/lib/libc/net/hesiod.c     Fri Mar 10 17:47:20 2017 +0000
+++ b/lib/libc/net/hesiod.c     Fri Mar 10 18:02:32 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hesiod.c,v 1.29 2017/03/10 17:47:20 maya Exp $ */
+/*     $NetBSD: hesiod.c,v 1.30 2017/03/10 18:02:32 maya Exp $ */
 
 /* Copyright (c) 1996 by Internet Software Consortium.
  *
@@ -51,7 +51,7 @@
     "#Id: hesiod_p.h,v 1.1 1996/12/08 21:39:37 ghudson Exp #");
 __IDSTRING(rcsid_hescompat_c,
     "#Id: hescompat.c,v 1.1.2.1 1996/12/16 08:37:45 ghudson Exp #");
-__RCSID("$NetBSD: hesiod.c,v 1.29 2017/03/10 17:47:20 maya Exp $");
+__RCSID("$NetBSD: hesiod.c,v 1.30 2017/03/10 18:02:32 maya Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -553,8 +553,7 @@
 
        if (init_context() < 0)
                return NULL;
-       if (bindname)
-               free(bindname);
+
        bindname = hesiod_to_bind(context, name, type);
        if (!bindname)
                translate_errors();



Home | Main Index | Thread Index | Old Index