1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-02 08:22:22 +00:00

(concat): Use SAFE_ALLOCA.

This commit is contained in:
Kim F. Storm 2004-11-29 15:35:15 +00:00
parent 0af8cfe11e
commit 2ec7f67a91

View File

@ -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;
}