Bug 451187 JS causes a crash in nspr [@ Bfree ]
authortimeless@mozdev.org
Wed, 13 Jan 2010 21:21:52 +0100
changeset 34441 5d60b8125b69637e8e139b3449936f15892f9bdf
parent 34440 df760e6d4ddc45026cfb00591acbe31035d0935b
child 34442 96ae337c41fbff7c1c96ddca599ee5997ffed406
push id1469
push usertimeless@mozdev.org
push dateSun, 18 Jul 2010 02:12:48 +0000
bugs451187
milestone1.9.2.8pre
Bug 451187 JS causes a crash in nspr [@ Bfree ] freedtoa should be marked as static as the data type returned by these implementations does not need to be freed with it r=crowder a=dveditz
js/src/dtoa.c
--- a/js/src/dtoa.c
+++ b/js/src/dtoa.c
@@ -2583,17 +2583,17 @@ nrv_alloc(CONST char *s, char **rve, int
 	}
 
 /* freedtoa(s) must be used to free values s returned by dtoa
  * when MULTIPLE_THREADS is #defined.  It should be used in all cases,
  * but for consistency with earlier versions of dtoa, it is optional
  * when MULTIPLE_THREADS is not defined.
  */
 
- void
+ static void
 #ifdef KR_headers
 freedtoa(s) char *s;
 #else
 freedtoa(char *s)
 #endif
 {
 	Bigint *b = (Bigint *)((int *)s - 1);
 	b->maxwds = 1 << (b->k = *(int*)b);