changeset 58623:834b3aeb850f

(concat): Use SAFE_ALLOCA.
author Kim F. Storm <storm@cua.dk>
date Mon, 29 Nov 2004 15:35:15 +0000
parents 5415af0b57e1
children a322009ca3d0
files src/fns.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/fns.c	Mon Nov 29 15:34:57 2004 +0000
+++ b/src/fns.c	Mon Nov 29 15:35:15 2004 +0000
@@ -562,6 +562,7 @@
   struct textprop_rec  *textprops = NULL;
   /* Number of elments in textprops.  */
   int num_textprops = 0;
+  USE_SAFE_ALLOCA;
 
   tail = Qnil;
 
@@ -670,8 +671,7 @@
 
   prev = Qnil;
   if (STRINGP (val))
-    textprops
-      = (struct textprop_rec *) alloca (sizeof (struct textprop_rec) * nargs);
+    SAFE_ALLOCA (textprops, struct textprop_rec *, sizeof (struct textprop_rec) * nargs);
 
   for (argnum = 0; argnum < nargs; argnum++)
     {
@@ -827,6 +827,8 @@
 	  last_to_end = textprops[argnum].to + SCHARS (this);
 	}
     }
+
+  SAFE_FREE ();
   return val;
 }