diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2011-07-28 18:01:17 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-07-28 18:01:17 -0700 |
commit | ea8a7d00f9678471e960117b0b87318dcf4e7d81 (patch) | |
tree | d015b06f00d21126db616f6945bf79e89d6a1d14 /src/minibuf.c | |
parent | c86960f076fd12d743da2b30768323efb9c22bbf (diff) | |
download | emacs-ea8a7d00f9678471e960117b0b87318dcf4e7d81.tar.gz |
* minibuf.c (read_minibuf_noninteractive): Don't leak memory
on memory overflow.
Diffstat (limited to 'src/minibuf.c')
-rw-r--r-- | src/minibuf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/minibuf.c b/src/minibuf.c index eb564a10ec6..30082af9037 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -261,7 +261,10 @@ read_minibuf_noninteractive (Lisp_Object map, Lisp_Object initial, if (len == size) { if (STRING_BYTES_BOUND / 2 < size) - memory_full (SIZE_MAX); + { + xfree (line); + memory_full (SIZE_MAX); + } size *= 2; line = (char *) xrealloc (line, size); } |