aboutsummaryrefslogtreecommitdiffstats
path: root/indications.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-02-11 03:54:28 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-02-11 03:54:28 +0000
commit043834c47de63928d20517615afaa1c19af97d89 (patch)
treefea0781c0984e9c492dba5885d45940632011a70 /indications.c
parent4ab36f26ab0a683cfb903721bcfe1981e8ec3a75 (diff)
Fix several memory leaks
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2153 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'indications.c')
-rwxr-xr-xindications.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/indications.c b/indications.c
index 55e11ff8b..68b8628d3 100755
--- a/indications.c
+++ b/indications.c
@@ -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;
}