|
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.
[Prev in Thread] | Current Thread | [Next in Thread] |