Bug: create_new_race is not properly allocating the where_name list
Discovered in: AFKMud 1.64
Danger: Medium - Memory error
Found by: Samson
Fixed by: Samson
for( i = 0; i where_name[i] = where_names[i];
for( i = 0; i where_name[i] = STRALLOC( where_names[i] );
When a race entry is removed later for whatever reason, the wear_name tables will attempt to STRFREE the list. However if this race was created online and the MUD has not yet rebooted, there will be a memory leak created. The string hash table will also contain improper information as a result.
This bug also affects the Smaug codebase, except that in Smaug it is using DISPOSE to free the entries while never having properly allocated them, so the fix above will require the use of str_dup instead.