Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/gdtoa unlock before returning on error, thanks enami.



details:   https://anonhg.NetBSD.org/src/rev/017d8b09d786
branches:  trunk
changeset: 771282:017d8b09d786
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Nov 18 04:17:23 2011 +0000

description:
unlock before returning on error, thanks enami.

diffstat:

 lib/libc/gdtoa/misc.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r de1d31b97c19 -r 017d8b09d786 lib/libc/gdtoa/misc.c
--- a/lib/libc/gdtoa/misc.c     Fri Nov 18 04:15:41 2011 +0000
+++ b/lib/libc/gdtoa/misc.c     Fri Nov 18 04:17:23 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: misc.c,v 1.8 2011/11/18 02:38:17 christos Exp $ */
+/* $NetBSD: misc.c,v 1.9 2011/11/18 04:17:23 christos Exp $ */
 
 /****************************************************************
 
@@ -415,8 +415,10 @@
                ACQUIRE_DTOA_LOCK(1);
                if (!(p5 = p5s)) {
                        p5 = p5s = i2b(625);
-                       if (p5 == NULL)
+                       if (p5 == NULL) {
+                               FREE_DTOA_LOCK(1);
                                return NULL;
+                       }
                        p5->next = 0;
                        }
                FREE_DTOA_LOCK(1);



Home | Main Index | Thread Index | Old Index