summaryrefslogtreecommitdiff
path: root/legacy/emotion/src/modules/generic/emotion_generic.c
diff options
context:
space:
mode:
authorIván Briano <sachieru@gmail.com>2012-08-27 19:34:18 +0000
committerIván Briano <sachieru@gmail.com>2012-08-27 19:34:18 +0000
commit1375052f40ab55f693a1b2830be2073de734d370 (patch)
tree0cc0b3b17f1fbb0508150c61d66e01de523a0098 /legacy/emotion/src/modules/generic/emotion_generic.c
parent6335870b45226fa705c9dda28325075a6651a770 (diff)
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 <dorileo@profusion.mobi> SVN revision: 75741
Diffstat (limited to '')
-rw-r--r--legacy/emotion/src/modules/generic/emotion_generic.c6
1 files 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 549c179534..69c3b9853c 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)
362 int i; 362 int i;
363 for (i = 0; i < ev->audio_channels_count; i++) 363 for (i = 0; i < ev->audio_channels_count; i++)
364 eina_stringshare_del(ev->audio_channels[i].name); 364 eina_stringshare_del(ev->audio_channels[i].name);
365 free(ev->audio_channels); 365 if (ev->audio_channels_count) free(ev->audio_channels);
366 ev->audio_channels_count = 0; 366 ev->audio_channels_count = 0;
367} 367}
368 368
@@ -372,7 +372,7 @@ _video_channels_free(Emotion_Generic_Video *ev)
372 int i; 372 int i;
373 for (i = 0; i < ev->video_channels_count; i++) 373 for (i = 0; i < ev->video_channels_count; i++)
374 eina_stringshare_del(ev->video_channels[i].name); 374 eina_stringshare_del(ev->video_channels[i].name);
375 free(ev->video_channels); 375 if (ev->video_channels_count) free(ev->video_channels);
376 ev->video_channels_count = 0; 376 ev->video_channels_count = 0;
377} 377}
378 378
@@ -382,7 +382,7 @@ _spu_channels_free(Emotion_Generic_Video *ev)
382 int i; 382 int i;
383 for (i = 0; i < ev->spu_channels_count; i++) 383 for (i = 0; i < ev->spu_channels_count; i++)
384 eina_stringshare_del(ev->spu_channels[i].name); 384 eina_stringshare_del(ev->spu_channels[i].name);
385 free(ev->spu_channels); 385 if (ev->spu_channels_count) free(ev->spu_channels);
386 ev->spu_channels_count = 0; 386 ev->spu_channels_count = 0;
387} 387}
388 388