diff options
author | cinap_lenrek <cinap_lenrek@rei2.9hal> | 2012-02-06 05:28:57 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@rei2.9hal> | 2012-02-06 05:28:57 +0100 |
commit | 5acde1e791e879cc24dc4fe8738994ea3a4bb9ba (patch) | |
tree | b147efa4ce3f9846e688eb611347eb43766d47ab /sys/src/9/port/devenv.c | |
parent | 1a450db960aa3c542c84a5fff0f66c5ce95c853f (diff) |
make smalloc() uninterruptable as most callers cant handle it anyway
Diffstat (limited to 'sys/src/9/port/devenv.c')
-rw-r--r-- | sys/src/9/port/devenv.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/src/9/port/devenv.c b/sys/src/9/port/devenv.c index b744b12fe..e93a95139 100644 --- a/sys/src/9/port/devenv.c +++ b/sys/src/9/port/devenv.c @@ -283,7 +283,11 @@ envwrite(Chan *c, void *a, long n, vlong off) len = offset+n; if(len > e->len) { - s = smalloc(len); + s = malloc(len); + if(s == nil){ + wunlock(eg); + error(Enomem); + } if(e->value){ memmove(s, e->value, e->len); free(e->value); |