Don't free if it's NULL
authorMark Spencer <markster@digium.com>
Wed, 11 Feb 2004 05:14:19 +0000 (05:14 +0000)
committerMark Spencer <markster@digium.com>
Wed, 11 Feb 2004 05:14:19 +0000 (05:14 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2154 65c4cc65-6c06-0410-ace0-fbb531ad65f3

indications.c

index 68b8628..4632f69 100755 (executable)
@@ -318,7 +318,8 @@ 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);
+               if (zone->ringcadance)
+                       free((void*)zone->ringcadance);
                free(zone->tones);
                zone->tones = tmp;
        }