Skip to content

Commit 269810a

Browse files
committed
build_target: fix memleak
1 parent d8e6a64 commit 269810a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

common/build_target.c2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public type Plugin struct {
5858
}
5959

6060
public type PluginList struct {
61-
Plugin* plugins;
61+
Plugin* plugins; // malloc'ed, ownership
6262
u32 count;
6363
u32 capacity;
6464
}
@@ -142,6 +142,7 @@ public fn Target* create(u32 name_idx, SrcLoc loc, Kind kind, string_pool.Pool*
142142

143143
public fn void Target.free(Target* t) {
144144
t.exports.free();
145+
t.plugins.free();
145146
t.libs.free();
146147
t.features.free();
147148
stdlib.free(t.files);

0 commit comments

Comments
 (0)