mood.c: Remove some superfluous includes.
[paraslash.git] / mood.c
diff --git a/mood.c b/mood.c
index 315ef0cbdc61b7de1a3bbbd8f8683d7ab81d9c81..40228be515678effb04587f61d0fbc75acbc44c1 100644 (file)
--- a/mood.c
+++ b/mood.c
 #include "afh.h"
 #include "afs.h"
 #include "list.h"
-#include "ipc.h"
 #include "mm.h"
-#include "sideband.h"
 #include "mood.h"
-#include "sched.h"
 
 /**
  * Contains statistical data of the currently admissible audio files.
@@ -363,9 +360,7 @@ success:
        ret = 1;
 out:
        free_argv(argv);
-       if (ret >= 0)
-               return ret;
-       if (mi) {
+       if (mi && (ret < 0 || !mlpd->m)) { /* mi was not added to any list */
                free(mi->parser_data);
                free(mi);
        }