077c9d
commit 8c1aafc1f34d090a5b41dc527c33e8687f6a1287
077c9d
Author: Florian Weimer <fweimer@redhat.com>
077c9d
Date:   Fri Dec 21 16:08:55 2018 +0100
077c9d
077c9d
    intl: Do not return NULL on asprintf failure in gettext [BZ #24018]
077c9d
    
077c9d
    Fixes commit 9695dd0c9309712ed8e9c17a7040fe7af347f2dc ("DCIGETTEXT:
077c9d
    Use getcwd, asprintf to construct absolute pathname").
077c9d
077c9d
diff --git a/intl/dcigettext.c b/intl/dcigettext.c
077c9d
index 2a5036994824875b..25f47c5bd3b0ea04 100644
077c9d
--- a/intl/dcigettext.c
077c9d
+++ b/intl/dcigettext.c
077c9d
@@ -631,7 +631,7 @@ DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2,
077c9d
 	  int ret = __asprintf (&xdirname, "%s/%s", cwd, dirname);
077c9d
 	  free (cwd);
077c9d
 	  if (ret < 0)
077c9d
-	      return NULL;
077c9d
+	    goto return_untranslated;
077c9d
 	  dirname = xdirname;
077c9d
 	}
077c9d
 #ifndef IN_LIBGLOCALE