From 9abed2b06e82abf7e4353342373ebde36cd748d2 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 20 Jun 2021 17:50:58 -0700 Subject: [PATCH] remove redundant error check in gvusershape_open The zmalloc function calls exit() on failure, so there is not need to check its return value for out-of-memory. --- lib/gvc/gvusershape.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/gvc/gvusershape.c b/lib/gvc/gvusershape.c index 3fe3ebdc6..4476571d1 100644 --- a/lib/gvc/gvusershape.c +++ b/lib/gvc/gvusershape.c @@ -663,8 +663,7 @@ static usershape_t *gvusershape_open (const char *name) ImageDict = dtopen(&ImageDictDisc, Dttree); if (! (us = gvusershape_find(name))) { - if (! (us = zmalloc(sizeof(usershape_t)))) - return NULL; + us = zmalloc(sizeof(usershape_t)); us->name = agstrdup (0, (char*)name); if (!gvusershape_file_access(us)) { -- 2.40.0