From a16d9e0c25ed986c57c521aa87d87f6c343218a7 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 20 Nov 2009 21:29:56 +0100 Subject: Malloc cannot return null. Clean up streams and filters. --- fitz/filt_faxd.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'fitz/filt_faxd.c') diff --git a/fitz/filt_faxd.c b/fitz/filt_faxd.c index 7a5cb774..7a244dfa 100644 --- a/fitz/filt_faxd.c +++ b/fitz/filt_faxd.c @@ -165,8 +165,8 @@ struct fz_faxd_s unsigned char *dst; }; -fz_error -fz_newfaxd(fz_filter **fp, fz_obj *params) +fz_filter * +fz_newfaxd(fz_obj *params) { fz_obj *obj; @@ -216,24 +216,12 @@ fz_newfaxd(fz_filter **fp, fz_obj *params) fax->eolc = 0; fax->ref = fz_malloc(fax->stride); - if (!fax->ref) - { - fz_free(fax); - return fz_rethrow(-1, "out of memory: scanline buffer one"); - } - fax->dst = fz_malloc(fax->stride); - if (!fax->dst) - { - fz_free(fax->ref); - fz_free(fax); - return fz_rethrow(-1, "out of memory: scanline buffer two"); - } memset(fax->ref, 0, fax->stride); memset(fax->dst, 0, fax->stride); - return fz_okay; + return (fz_filter*)fz_okay; } void -- cgit v1.2.3