aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm <[email protected]>2004-11-29 15:35:15 +0000
committerKim F. Storm <[email protected]>2004-11-29 15:35:15 +0000
commit2ec7f67a91cc52b23058136d4bb915a0b3c6974e (patch)
tree762216f01dca6a148cb38329a18df22e70186e3b /src
parent0af8cfe11e13ba987555f12cee2ea3a4aa77cbd2 (diff)
(concat): Use SAFE_ALLOCA.
Diffstat (limited to 'src')
-rw-r--r--src/fns.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/fns.c b/src/fns.c
index c436649f73..457be6c96a 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -562,6 +562,7 @@ concat (nargs, args, target_type, last_special)
struct textprop_rec *textprops = NULL;
/* Number of elments in textprops. */
int num_textprops = 0;
+ USE_SAFE_ALLOCA;
tail = Qnil;
@@ -670,8 +671,7 @@ concat (nargs, args, target_type, last_special)
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 @@ concat (nargs, args, target_type, last_special)
last_to_end = textprops[argnum].to + SCHARS (this);
}
}
+
+ SAFE_FREE ();
return val;
}