diff options
author | Tobias Stoeckmann <tobias@stoeckmann.org> | 2015-02-16 23:05:13 +0100 |
---|---|---|
committer | Andreas Gruenbacher <agruen@gnu.org> | 2015-07-08 20:55:51 +0200 |
commit | 871f87824ae9b6e7aa5379753327e56dc9e509fc (patch) | |
tree | ef92e9e4c8a98a15ffda1310609b3635fc9a115d | |
parent | 5c6625bf62a81c114d849faa1a9cc95c126034a5 (diff) | |
download | patch-871f87824ae9b6e7aa5379753327e56dc9e509fc.tar.gz |
Use xmalloc in bestmatch
* src/bestmatch.h (bestmatch): Use xmalloc instead of malloc to handle
out-of-memory situations.
-rw-r--r-- | src/bestmatch.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bestmatch.h b/src/bestmatch.h index 1b12923..b0d5cfb 100644 --- a/src/bestmatch.h +++ b/src/bestmatch.h @@ -64,7 +64,7 @@ bestmatch(OFFSET xoff, OFFSET xlim, OFFSET yoff, OFFSET ylim, OFFSET fmid_plus_2_min, ymax = -1; OFFSET c; - V = malloc ((2 * max + 3) * sizeof (OFFSET)); + V = xmalloc ((2 * max + 3) * sizeof (OFFSET)); fd = V + max + 1 - fmid; /* |