cinera.c: Fix leak in GenerateTopicColours()

This commit is contained in:
Matt Mascarenhas 2020-06-03 18:04:39 +01:00
parent 0959fa2774
commit 6da970d48c
1 changed files with 3 additions and 2 deletions

View File

@ -23,7 +23,7 @@ typedef struct
version CINERA_APP_VERSION = {
.Major = 0,
.Minor = 7,
.Patch = 14
.Patch = 15
};
#include <stdarg.h> // NOTE(matt): varargs
@ -6998,7 +6998,6 @@ GenerateTopicColours(neighbourhood *N, string Topic)
#endif
fclose(Topics.Handle);
FreeFile(&Topics);
asset *Asset = GetPlaceInBook(&Assets, ASSET_CSS_TOPICS);
if(Asset->Known)
@ -7013,6 +7012,8 @@ GenerateTopicColours(neighbourhood *N, string Topic)
PlaceAsset(Wrap0(CSSTopics->Filename), CSSTopics->Type, CSSTopics->Variants, CSSTopics->Associated, ASSET_CSS_TOPICS);
}
}
FreeFile(&Topics);
return RC_SUCCESS;
}