Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #23 from apiaryio/klokane/hotfix-memoryleak
Browse files Browse the repository at this point in the history
Fix memory leak
  • Loading branch information
kylef committed Apr 2, 2015
2 parents 92f2676 + e3f4c67 commit 02d69c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#define DRAFTER_MAJOR_VERSION 0
#define DRAFTER_MINOR_VERSION 1
#define DRAFTER_PATCH_VERSION 0
#define DRAFTER_PATCH_VERSION 1

#define DRAFTER_VERSION_IS_RELEASE 1

Expand Down
12 changes: 6 additions & 6 deletions src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ int main(int argc, const char *argv[])
if (!config.validate) { // not just validate -> we will serialize
sos::Serialize* serializer = CreateSerializer(config.format);

Serialization(CreateStreamFromName<std::ostream>(config.output),
drafter::WrapBlueprint(blueprint.node),
serializer);
std::ostream *out = CreateStreamFromName<std::ostream>(config.output);
Serialization(out, drafter::WrapBlueprint(blueprint.node), serializer);
delete out;

if (options & snowcrash::ExportSourcemapOption) {
Serialization(CreateStreamFromName<std::ostream>(config.sourceMap),
drafter::WrapBlueprintSourcemap(blueprint.sourceMap),
serializer);
std::ostream *sourcemap = CreateStreamFromName<std::ostream>(config.sourceMap);
Serialization(sourcemap, drafter::WrapBlueprintSourcemap(blueprint.sourceMap), serializer);
delete sourcemap;
}

delete serializer;
Expand Down

0 comments on commit 02d69c7

Please sign in to comment.