diff options
author | Neil Conway | 2006-03-19 22:22:56 +0000 |
---|---|---|
committer | Neil Conway | 2006-03-19 22:22:56 +0000 |
commit | a323ede2802956f115d71599514fbc01f2575dee (patch) | |
tree | 8d2bf7809a9c007563342c3dff8096e8e5acc8f5 /contrib/fuzzystrmatch/fuzzystrmatch.c | |
parent | 381cb046ed60a1164a244e2f9aa28b8128ea2ac5 (diff) |
Fix a few places that were checking for the return value of palloc() to be
non-NULL: palloc() ereports on OOM, so we can safely assume it returns a
valid pointer.
Diffstat (limited to 'contrib/fuzzystrmatch/fuzzystrmatch.c')
-rw-r--r-- | contrib/fuzzystrmatch/fuzzystrmatch.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/contrib/fuzzystrmatch/fuzzystrmatch.c b/contrib/fuzzystrmatch/fuzzystrmatch.c index 64b6c41b425..29bba52596c 100644 --- a/contrib/fuzzystrmatch/fuzzystrmatch.c +++ b/contrib/fuzzystrmatch/fuzzystrmatch.c @@ -5,7 +5,7 @@ * * Joe Conway <mail@joeconway.com> * - * $PostgreSQL: pgsql/contrib/fuzzystrmatch/fuzzystrmatch.c,v 1.19 2006/03/11 04:38:29 momjian Exp $ + * $PostgreSQL: pgsql/contrib/fuzzystrmatch/fuzzystrmatch.c,v 1.20 2006/03/19 22:22:56 neilc Exp $ * Copyright (c) 2001-2006, PostgreSQL Global Development Group * ALL RIGHTS RESERVED; * @@ -347,14 +347,10 @@ _metaphone( if (max_phonemes == 0) { /* Assume largest possible */ *phoned_word = palloc(sizeof(char) * strlen(word) +1); - if (!*phoned_word) - return META_ERROR; } else { *phoned_word = palloc(sizeof(char) * max_phonemes + 1); - if (!*phoned_word) - return META_ERROR; } /*-- The first phoneme has to be processed specially. --*/ |