mirror of
https://github.com/opnsense/src.git
synced 2026-03-19 09:13:43 -04:00
Now malloc() is fixed, remove errno hardcoding to ENOMEM
This commit is contained in:
parent
5c5384fe80
commit
e34fe8a408
1 changed files with 6 additions and 3 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue