sort: free/xmalloc rather than xrealloc
commit2050a5913b0ee2e08de22db29340865f7f0ee608
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 10 Aug 2010 20:49:41 +0000 (10 13:49 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 10 Aug 2010 20:49:57 +0000 (10 13:49 -0700)
treef74c6793684f5933aaf738c5d068d0618c02d59e
parent7861d74ba8d1e237c22e5ba0d413806fd8436c03
sort: free/xmalloc rather than xrealloc

* src/sort.c (compare_random): Use free/xmalloc rather than
xrealloc, since the old buffer contents need not be preserved.
Also, don't fail if the guessed-sized malloc fails.  Suggested by
Bruno Haible.
src/sort.c