Skip to content

Commit 8a8615d

Browse files
committed
Fix leak in check_get_ldk_[bindings_]version
1 parent b560eca commit 8a8615d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

genbindings.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ static inline const char* check_get_ldk_version() {
137137
// Version mismatch, we don't know what we're running!
138138
return 0;
139139
}
140+
Str_free(bin_ver);
140141
return _LDK_HEADER_VER;
141142
}
142143
static inline const char* check_get_ldk_bindings_version() {
@@ -145,6 +146,7 @@ static inline const char* check_get_ldk_bindings_version() {
145146
// Version mismatch, we don't know what we're running!
146147
return 0;
147148
}
149+
Str_free(bin_ver);
148150
return _LDK_C_BINDINGS_HEADER_VER;
149151
}
150152
#endif /* _LDK_HEADER_VER */

0 commit comments

Comments
 (0)