diff options
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/buffer.c b/src/buffer.c index edf04aa2e64..ddfab45d148 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -197,12 +197,12 @@ The value is never nil.") | |||
| 197 | if (!NILP (buf)) | 197 | if (!NILP (buf)) |
| 198 | return buf; | 198 | return buf; |
| 199 | 199 | ||
| 200 | b = (struct buffer *) malloc (sizeof (struct buffer)); | 200 | b = (struct buffer *) xmalloc (sizeof (struct buffer)); |
| 201 | if (!b) | ||
| 202 | memory_full (); | ||
| 203 | 201 | ||
| 204 | BUF_GAP_SIZE (b) = 20; | 202 | BUF_GAP_SIZE (b) = 20; |
| 203 | BLOCK_INPUT; | ||
| 205 | BUFFER_ALLOC (BUF_BEG_ADDR (b), BUF_GAP_SIZE (b)); | 204 | BUFFER_ALLOC (BUF_BEG_ADDR (b), BUF_GAP_SIZE (b)); |
| 205 | UNBLOCK_INPUT; | ||
| 206 | if (! BUF_BEG_ADDR (b)) | 206 | if (! BUF_BEG_ADDR (b)) |
| 207 | memory_full (); | 207 | memory_full (); |
| 208 | 208 | ||
| @@ -750,7 +750,9 @@ with `delete-process'.") | |||
| 750 | /* Perhaps we should explicitly free the interval tree here... */ | 750 | /* Perhaps we should explicitly free the interval tree here... */ |
| 751 | 751 | ||
| 752 | b->name = Qnil; | 752 | b->name = Qnil; |
| 753 | BLOCK_INPUT; | ||
| 753 | BUFFER_FREE (BUF_BEG_ADDR (b)); | 754 | BUFFER_FREE (BUF_BEG_ADDR (b)); |
| 755 | UNBLOCK_INPUT; | ||
| 754 | b->undo_list = Qnil; | 756 | b->undo_list = Qnil; |
| 755 | 757 | ||
| 756 | return Qt; | 758 | return Qt; |
| @@ -1513,7 +1515,7 @@ DEFUN ("overlays-at", Foverlays_at, Soverlays_at, 1, 1, 0, | |||
| 1513 | /* Make a list of them all. */ | 1515 | /* Make a list of them all. */ |
| 1514 | result = Flist (noverlays, overlay_vec); | 1516 | result = Flist (noverlays, overlay_vec); |
| 1515 | 1517 | ||
| 1516 | free (overlay_vec); | 1518 | xfree (overlay_vec); |
| 1517 | return result; | 1519 | return result; |
| 1518 | } | 1520 | } |
| 1519 | 1521 | ||
| @@ -1553,7 +1555,7 @@ DEFUN ("next-overlay-change", Fnext_overlay_change, Snext_overlay_change, | |||
| 1553 | endpos = oendpos; | 1555 | endpos = oendpos; |
| 1554 | } | 1556 | } |
| 1555 | 1557 | ||
| 1556 | free (overlay_vec); | 1558 | xfree (overlay_vec); |
| 1557 | return make_number (endpos); | 1559 | return make_number (endpos); |
| 1558 | } | 1560 | } |
| 1559 | 1561 | ||