Fix several memory leaks

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-02-11 03:54:28 +00:00
parent 7cdb6d36f4
commit bac2215fb6
4 changed files with 27 additions and 1 deletions

View File

@@ -318,6 +318,7 @@ static inline void free_zone(struct tone_zone* zone)
struct tone_zone_sound *tmp = zone->tones->next;
free((void*)zone->tones->name);
free((void*)zone->tones->data);
free((void*)zone->ringcadance);
free(zone->tones);
zone->tones = tmp;
}
@@ -395,6 +396,8 @@ int ast_unregister_indication_country(const char *country)
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Unregistered indication country '%s'\n",tz->country);
free_zone(tz);
if (tone_zones == tz)
tone_zones = tmp;
tz = tmp;
res = 0;
}