From 1375052f40ab55f693a1b2830be2073de734d370 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Iv=C3=A1n=20Briano?= Date: Mon, 27 Aug 2012 19:34:18 +0000 Subject: [PATCH] emotion: free channels only if there's channel to free No need to free channels if there's no channels to be freed. By: Leandro Dorileo SVN revision: 75741 --- legacy/emotion/src/modules/generic/emotion_generic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/legacy/emotion/src/modules/generic/emotion_generic.c b/legacy/emotion/src/modules/generic/emotion_generic.c index 549c179..69c3b98 100644 --- a/legacy/emotion/src/modules/generic/emotion_generic.c +++ b/legacy/emotion/src/modules/generic/emotion_generic.c @@ -362,7 +362,7 @@ _audio_channels_free(Emotion_Generic_Video *ev) int i; for (i = 0; i < ev->audio_channels_count; i++) eina_stringshare_del(ev->audio_channels[i].name); - free(ev->audio_channels); + if (ev->audio_channels_count) free(ev->audio_channels); ev->audio_channels_count = 0; } @@ -372,7 +372,7 @@ _video_channels_free(Emotion_Generic_Video *ev) int i; for (i = 0; i < ev->video_channels_count; i++) eina_stringshare_del(ev->video_channels[i].name); - free(ev->video_channels); + if (ev->video_channels_count) free(ev->video_channels); ev->video_channels_count = 0; } @@ -382,7 +382,7 @@ _spu_channels_free(Emotion_Generic_Video *ev) int i; for (i = 0; i < ev->spu_channels_count; i++) eina_stringshare_del(ev->spu_channels[i].name); - free(ev->spu_channels); + if (ev->spu_channels_count) free(ev->spu_channels); ev->spu_channels_count = 0; } -- 2.7.4