From: Andre Noll Date: Sat, 12 Mar 2022 15:55:45 +0000 (+0100) Subject: Merge branch 'maint' X-Git-Tag: v0.7.0~3 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=46b9e018548fa7baebe62b6c724d215c84dcb20f;p=paraslash.git Merge branch 'maint' 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. --- 46b9e018548fa7baebe62b6c724d215c84dcb20f diff --cc mood.c index bbe84734,4e0a7e3d..e0d9e275 --- a/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(