emacs-devel
[Top][All Lists]
Advanced

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

Re: replace alloca with strdup


From: Masatake YAMATO
Subject: Re: replace alloca with strdup
Date: Sun, 22 May 2005 02:07:51 +0900 (JST)

Hi,

> -  error_msg = (char *) alloca (strlen (error_message) + 1);
> -  strcpy (error_msg, error_message);
> +  if ((error_msg = strdup(error_message)) == NULL)
> +    errx(1, "Out of memory.");
> +

I wonder who will release the memory chunk allocated by strdup.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]