Skip to content

Commit 8440142

Browse files
committed
InitSystem: fix memory leaks
1 parent 2e865ad commit 8440142

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/modules/initsystem/initsystem.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ void ffPrintInitSystem(FFInitSystemOptions* options)
4646
exit:
4747
ffStrbufDestroy(&result.name);
4848
ffStrbufDestroy(&result.exe);
49+
ffStrbufDestroy(&result.version);
4950
}
5051

5152
bool ffParseInitSystemCommandOptions(FFInitSystemOptions* options, const char* key, const char* value)
@@ -109,6 +110,7 @@ void ffGenerateInitSystemJsonResult(FF_MAYBE_UNUSED FFInitSystemOptions* options
109110
exit:
110111
ffStrbufDestroy(&result.name);
111112
ffStrbufDestroy(&result.exe);
113+
ffStrbufDestroy(&result.version);
112114
}
113115

114116
void ffPrintInitSystemHelpFormat(void)

0 commit comments

Comments
 (0)