Ensure that memory is zero-initialised.
This commit is contained in:
parent
2cdcc16bc2
commit
c471f617b7
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ void chkstr();
|
||||||
string myalloc(size) {
|
string myalloc(size) {
|
||||||
register string p;
|
register string p;
|
||||||
|
|
||||||
p = (string) malloc((unsigned)size);
|
p = (string) calloc((unsigned)size, 1);
|
||||||
if (p==0)
|
if (p==0)
|
||||||
fatal("Out of memory");
|
fatal("Out of memory");
|
||||||
return(p);
|
return(p);
|
||||||
|
|
Loading…
Add table
Reference in a new issue