Mercurial > emacs
diff src/alloc.c @ 590:1a6483439acc
*** empty log message ***
| author | Jim Blandy <jimb@redhat.com> |
|---|---|
| date | Fri, 20 Mar 1992 06:01:16 +0000 |
| parents | 8c615e453683 |
| children | a8d78999e46d |
line wrap: on
line diff
--- a/src/alloc.c Wed Mar 18 23:58:40 1992 +0000 +++ b/src/alloc.c Fri Mar 20 06:01:16 1992 +0000 @@ -1,5 +1,5 @@ /* Storage allocation and gc for GNU Emacs Lisp interpreter. - Copyright (C) 1985, 1986, 1988 Free Software Foundation, Inc. + Copyright (C) 1985, 1986, 1988, 1992 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -163,7 +163,12 @@ { register long *val; - val = (long *) realloc (block, size); + /* We must call malloc explicitly when BLOCK is 0, since some + reallocs don't do this. */ + if (! block) + val = (long *) malloc (size); + ese + val = (long *) realloc (block, size); if (!val && size) memory_full (); return val;
