diff options
-rw-r--r-- | fitz/res_font.c | 4 | ||||
-rw-r--r-- | mupdf/pdf_colorspace1.c | 6 | ||||
-rw-r--r-- | mupdf/pdf_font.c | 2 | ||||
-rw-r--r-- | mupdf/pdf_type3.c | 2 |
4 files changed, 0 insertions, 14 deletions
diff --git a/fitz/res_font.c b/fitz/res_font.c index 4cf523f1..cb6bc333 100644 --- a/fitz/res_font.c +++ b/fitz/res_font.c @@ -164,8 +164,6 @@ fz_newfontfromfile(fz_font **fontp, char *path, int index) return fz_rethrow(error, "cannot init freetype library"); font = fz_newfont(); - if (!font) - return fz_rethrow(-1, "out of memory: font struct"); fterr = FT_New_Face(fz_ftlib, path, index, (FT_Face*)&font->ftface); if (fterr) @@ -190,8 +188,6 @@ fz_newfontfrombuffer(fz_font **fontp, unsigned char *data, int len, int index) return fz_rethrow(error, "cannot init freetype library"); font = fz_newfont(); - if (!font) - return fz_rethrow(-1, "out of memory: font struct"); fterr = FT_New_Memory_Face(fz_ftlib, data, len, index, (FT_Face*)&font->ftface); if (fterr) diff --git a/mupdf/pdf_colorspace1.c b/mupdf/pdf_colorspace1.c index 38b645e1..e03aae70 100644 --- a/mupdf/pdf_colorspace1.c +++ b/mupdf/pdf_colorspace1.c @@ -486,12 +486,6 @@ loadseparation(fz_colorspace **csp, pdf_xref *xref, fz_obj *array) } cs = fz_malloc(sizeof(struct separation)); - if (!cs) - { - pdf_dropfunction(tint); - fz_dropcolorspace(base); - return fz_rethrow(-1, "out of memory: separation colorspace struct"); - } initcs((fz_colorspace*)cs, n == 1 ? "Separation" : "DeviceN", n, diff --git a/mupdf/pdf_font.c b/mupdf/pdf_font.c index 7ae140fc..326295b0 100644 --- a/mupdf/pdf_font.c +++ b/mupdf/pdf_font.c @@ -574,8 +574,6 @@ loadcidfont(pdf_fontdesc **fontdescp, pdf_xref *xref, fz_obj *dict, fz_obj *enco */ fontdesc = pdf_newfontdesc(); - if (!fontdesc) - return fz_rethrow(-1, "out of memory"); pdf_logfont("load cid font (%d %d R) ptr=%p {\n", fz_tonum(dict), fz_togen(dict), fontdesc); pdf_logfont("basefont %s\n", basefont); diff --git a/mupdf/pdf_type3.c b/mupdf/pdf_type3.c index c4616b0a..4bf1ec4f 100644 --- a/mupdf/pdf_type3.c +++ b/mupdf/pdf_type3.c @@ -59,8 +59,6 @@ pdf_loadtype3font(pdf_fontdesc **fontdescp, pdf_xref *xref, fz_obj *rdb, fz_obj sprintf(buf, "Unnamed-T3"); fontdesc = pdf_newfontdesc(); - if (!fontdesc) - return fz_rethrow(-1, "out of memory: font struct"); pdf_logfont("load type3 font (%d %d R) ptr=%p {\n", fz_tonum(dict), fz_togen(dict), fontdesc); pdf_logfont("name %s\n", buf); |