]> git.tue.mpg.de Git - paraslash.git/commitdiff
Merge branch 'maint'
authorAndre Noll <maan@tuebingen.mpg.de>
Sat, 12 Mar 2022 15:55:45 +0000 (16:55 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Sat, 12 Mar 2022 15:55:45 +0000 (16:55 +0100)
A couple of urgent fixes for old bugs, the critical one being the
patch to reject empty mood arguments.

Cooking only for a few days to get these fixes merged ASAP.

* maint:
  com_addatt(): Fix memory leak.
  mood.c: Fix memory leak in change_current_mood().
  mp.c: Fix memory leak on parse errors.
  Reject empty mood arguments.

1  2 
mood.c
mp.c

diff --cc mood.c
index bbe84734deffd189d7fb8d05ac3e58877b356f8f,4e0a7e3ddca78ed0e274cd2afba792fe767e25c3..e0d9e2750dd65b53f988e9b7ff06b981300cc31f
--- 1/mood.c
--- 2/mood.c
+++ b/mood.c
@@@ -652,13 -903,11 +656,13 @@@ int change_current_mood(const char *moo
        if (ret < 0) {
                if (errmsg)
                        *errmsg = make_message("audio file loop failed");
-               return ret;
+               goto out;
        }
 +      clock_get_realtime(&rnow);
 +      compute_correction_factors(rnow.tv_sec);
 +      log_statistics(rnow.tv_sec);
        for (i = 0; i < statistics.num; i++) {
 -              struct admissible_file_info *a = aa.array + i;
 -              ret = add_to_score_table(a->aft_row, a->score);
 +              ret = add_to_score_table(aa.array[i]);
                if (ret < 0) {
                        if (errmsg)
                                *errmsg = make_message(
diff --cc mp.c
Simple merge