]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - mood.c
Merge branch 'refs/heads/t/sqrt'
[paraslash.git] / mood.c
diff --git a/mood.c b/mood.c
index e9c5bd6e0e60ca55e5fc3bb4e67234bdf51fc193..bbe3a8ae08c65748c1414b6f16fe91bda669b32e 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.
@@ -391,9 +388,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);
        }