1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

Now malloc() is fixed, remove errno hardcoding to ENOMEM

This commit is contained in:
Andrey A. Chernov 2002-08-12 17:14:04 +00:00
parent 5c5384fe80
commit e34fe8a408
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=101747

View File

@ -92,23 +92,26 @@ __collate_load_tables(const char *encoding)
if ((TMP_substitute_table =
malloc(sizeof(__collate_substitute_table))) == NULL) {
saverr = errno;
(void)fclose(fp);
errno = ENOMEM;
errno = saverr;
return (_LDP_ERROR);
}
if ((TMP_char_pri_table =
malloc(sizeof(__collate_char_pri_table))) == NULL) {
saverr = errno;
free(TMP_substitute_table);
(void)fclose(fp);
errno = ENOMEM;
errno = saverr;
return (_LDP_ERROR);
}
if ((TMP_chain_pri_table =
malloc(sizeof(__collate_chain_pri_table))) == NULL) {
saverr = errno;
free(TMP_substitute_table);
free(TMP_char_pri_table);
(void)fclose(fp);
errno = ENOMEM;
errno = saverr;
return (_LDP_ERROR);
}