Source-Changes-HG archive

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

[src/trunk]: src/sys/lib/libsa Move deallocation of shstrsz inside the block ...



details:   https://anonhg.NetBSD.org/src/rev/554afe73fe63
branches:  trunk
changeset: 823285:554afe73fe63
user:      uwe <uwe%NetBSD.org@localhost>
date:      Tue Apr 18 06:39:54 2017 +0000

description:
Move deallocation of shstrsz inside the block where it is allocated.

diffstat:

 sys/lib/libsa/loadfile_elf32.c |  8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diffs (22 lines):

diff -r e0d99af23fb2 -r 554afe73fe63 sys/lib/libsa/loadfile_elf32.c
--- a/sys/lib/libsa/loadfile_elf32.c    Tue Apr 18 05:26:41 2017 +0000
+++ b/sys/lib/libsa/loadfile_elf32.c    Tue Apr 18 06:39:54 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: loadfile_elf32.c,v 1.38 2017/04/17 18:06:30 uwe Exp $ */
+/* $NetBSD: loadfile_elf32.c,v 1.39 2017/04/18 06:39:54 uwe Exp $ */
 
 /*
  * Copyright (c) 1997, 2008 The NetBSD Foundation, Inc.
@@ -571,10 +571,8 @@
                                PROGRESS(("]"));
                }
                DEALLOC(shp, sz);
-       }
-
-       if (shstr) {
-           DEALLOC(shstr, shstrsz);
+               if (shstr)
+                       DEALLOC(shstr, shstrsz);
        }
 
        /*



Home | Main Index | Thread Index | Old Index