Changeset 1225:d23a96a76518 for charset.c
Legend:
- Unmodified
- Added
- Removed
-
charset.c
r991 r1225 432 432 hash_insert (cs->symb_to_repr, cd->symbol, cd, 0); 433 433 434 if (cs->description[cd->repr]) 435 { 436 hash_delete (cs->symb_to_repr, cs->description[cd->repr]->symbol, cs->description[cd->repr], NULL); 437 chardesc_free (&cs->description[cd->repr]); 438 } 439 else 434 /* note: we intentionally leak some memory here. */ 435 if (!cs->description[cd->repr]) 440 436 cs->u_symb++; 441 437 … … 456 452 cs->n_symb = new_size; 457 453 } 454 458 455 hash_delete (cs->symb_to_repr, cd->symbol, NULL, NULL); 459 456 hash_insert (cs->symb_to_repr, cd->symbol, cd, 0); 457 460 458 cs->description[cs->u_symb++] = cd; 461 459 cd = NULL; 462 460 } 463 461 } 462 464 463 if (cd) 465 464 { … … 504 503 key->repr = repr; 505 504 key->symbol = "<unknown>"; /* otherwise, the 506 * debug code may507 * segfault. ouch.508 */505 * debug code may 506 * segfault. ouch. 507 */ 509 508 510 509 r = bsearch (&key, cs->description, cs->u_symb,
