Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/gdtoa one more error path that didn't free a lock.



details:   https://anonhg.NetBSD.org/src/rev/f91369a081e0
branches:  trunk
changeset: 771453:f91369a081e0
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Mon Nov 21 09:46:19 2011 +0000

description:
one more error path that didn't free a lock.

diffstat:

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

diffs (21 lines):

diff -r b673e91bbf1b -r f91369a081e0 lib/libc/gdtoa/misc.c
--- a/lib/libc/gdtoa/misc.c     Mon Nov 21 09:07:59 2011 +0000
+++ b/lib/libc/gdtoa/misc.c     Mon Nov 21 09:46:19 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: misc.c,v 1.10 2011/11/18 08:20:13 martin Exp $ */
+/* $NetBSD: misc.c,v 1.11 2011/11/21 09:46:19 mlelstv Exp $ */
 
 /****************************************************************
 
@@ -76,8 +76,10 @@
                else
                        rv = (Bigint*)MALLOC(len*sizeof(double));
 #endif
-               if (rv == NULL)
+               if (rv == NULL) {
+                       FREE_DTOA_LOCK(0);
                        return NULL;
+               }
                rv->k = k;
                rv->maxwds = x;
                }



Home | Main Index | Thread Index | Old Index