diff options
| author | Jim Blandy | 1992-03-20 06:01:16 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-03-20 06:01:16 +0000 |
| commit | 56d2031be55a6e52919f39afdca611b1efdda177 (patch) | |
| tree | f5ec31423102d947312b3d11519a8c0a86676379 /src/alloc.c | |
| parent | b0265c647d1699942f49dd3544d72c96314b34be (diff) | |
| download | emacs-56d2031be55a6e52919f39afdca611b1efdda177.tar.gz emacs-56d2031be55a6e52919f39afdca611b1efdda177.zip | |
*** empty log message ***
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/alloc.c b/src/alloc.c index 24bb67c6dda..6cff322182d 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Storage allocation and gc for GNU Emacs Lisp interpreter. | 1 | /* Storage allocation and gc for GNU Emacs Lisp interpreter. |
| 2 | Copyright (C) 1985, 1986, 1988 Free Software Foundation, Inc. | 2 | Copyright (C) 1985, 1986, 1988, 1992 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is part of GNU Emacs. | 4 | This file is part of GNU Emacs. |
| 5 | 5 | ||
| @@ -163,7 +163,12 @@ xrealloc (block, size) | |||
| 163 | { | 163 | { |
| 164 | register long *val; | 164 | register long *val; |
| 165 | 165 | ||
| 166 | val = (long *) realloc (block, size); | 166 | /* We must call malloc explicitly when BLOCK is 0, since some |
| 167 | reallocs don't do this. */ | ||
| 168 | if (! block) | ||
| 169 | val = (long *) malloc (size); | ||
| 170 | ese | ||
| 171 | val = (long *) realloc (block, size); | ||
| 167 | 172 | ||
| 168 | if (!val && size) memory_full (); | 173 | if (!val && size) memory_full (); |
| 169 | return val; | 174 | return val; |