]> git.tuebingen.mpg.de Git - paraslash.git/commit
afs: Fix memory leak in mood_load().
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 7 May 2023 18:04:19 +0000 (20:04 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Fri, 12 May 2023 10:19:34 +0000 (12:19 +0200)
commit6e3e710015b0b2c208b80a91d5f7842482359db2
treeaa84714a1069401d1277b48ada2d3c1b5e1b521b
parentac03b19b1693fbb7b1d558989ac81c79ed1284ae
afs: Fix memory leak in mood_load().

If mood_load() manages to load the mood but does not find any
admissible files, it does not deallocate the mood instance and does
not set up the global current_mood variable either. Plug the resulting
memory leak by destroying the mood also if there are no admissible
files (ret == 0).
mood.c