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