Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2007-11-27 00:30:49 +0300
committerChristopher Faylor <me@cgf.cx>2007-11-27 00:30:49 +0300
commitee4388c4200ed46ebeb8509f6dd204a6476017dc (patch)
tree55fd4f1c7f8e169eb4aad0c646333be0cc2a1da3 /winsup/cygwin/environ.cc
parent32cba6cb3a8366df854ba24ece2a60f1b2f872a3 (diff)
Change many cygheap allocation routines to their *_abort analogs.
* cygheap.cc (cmalloc_abort): New function. (crealloc_abort): Ditto. (ccalloc_abort): Ditto.
Diffstat (limited to 'winsup/cygwin/environ.cc')
-rw-r--r--winsup/cygwin/environ.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc
index 54063d889..e91cc5ad2 100644
--- a/winsup/cygwin/environ.cc
+++ b/winsup/cygwin/environ.cc
@@ -248,7 +248,7 @@ getearly (const char * name, int *)
return *ptr + len + 1;
}
else if ((len = GetEnvironmentVariable (name, NULL, 0))
- && (ret = (char *) cmalloc (HEAP_2_STR, len))
+ && (ret = (char *) cmalloc_abort (HEAP_2_STR, len))
&& GetEnvironmentVariable (name, ret, len))
return ret;
@@ -848,7 +848,7 @@ getwinenveq (const char *name, size_t namelen, int x)
totlen += namelen;
else
namelen = 0;
- char *p = (char *) cmalloc ((cygheap_types) x, totlen);
+ char *p = (char *) cmalloc_abort ((cygheap_types) x, totlen);
if (namelen)
strcpy (p, name);
if (GetEnvironmentVariable (name0, p + namelen, totlen))
@@ -919,7 +919,7 @@ spenv::retrieve (bool no_envblock, const char *const env)
p = (cygheap->user.*from_cygheap) (name, namelen);
if (!p || (no_envblock && !env) || (p == env_dontadd))
return env_dontadd;
- char *s = (char *) cmalloc (HEAP_1_STR, namelen + strlen (p) + 1);
+ char *s = (char *) cmalloc_abort (HEAP_1_STR, namelen + strlen (p) + 1);
strcpy (s, name);
strcpy (s + namelen, p);
debug_printf ("using computed value for '%s'", name);
@@ -954,7 +954,7 @@ build_env (const char * const *envp, char *&envblock, int &envc,
continue;
/* Allocate a new "argv-style" environ list with room for extra stuff. */
- char **newenv = (char **) cmalloc (HEAP_1_ARGV, sizeof (char *) *
+ char **newenv = (char **) cmalloc_abort (HEAP_1_ARGV, sizeof (char *) *
(n + SPENVS_SIZE + 1));
int tl = 0;