Addresses-Coverity-ID: #295143
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
{
register int sci_idx;
register ss_data *new_table;
- register ss_data **table;
+ register ss_data **table, **rt;
*code_ptr = 0;
table = _ss_table;
for (sci_idx = 1; table[sci_idx] != (ss_data *)NULL; sci_idx++)
;
- table = (ss_data **) realloc((char *)table,
- ((unsigned)sci_idx+2)*size);
- if (table == NULL) {
- *code_ptr = errno;
+ rt = (ss_data **) realloc((char *)table, ((unsigned)sci_idx+2)*size);
+ if (rt == NULL) {
+ *code_ptr = ENOMEM;
+ free(table);
return 0;
}
table[sci_idx+1] = (ss_data *) NULL;