File tree 1 file changed +5
-0
lines changed
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -153,12 +153,14 @@ bool Replay::OpenReplayFromBuffer(std::vector<uint8_t>&& contents) {
153
153
// this is should only feed the fake header, if for some reasons
154
154
// LZMA_STREAM_END is returned, then something went wrong
155
155
if (lzma_code (&stream, LZMA_RUN) != LZMA_OK) {
156
+ lzma_end (&stream);
156
157
Reset ();
157
158
return false ;
158
159
}
159
160
}
160
161
161
162
if (stream.total_out != 0 ) {
163
+ lzma_end (&stream);
162
164
Reset ();
163
165
return false ;
164
166
}
@@ -170,6 +172,7 @@ bool Replay::OpenReplayFromBuffer(std::vector<uint8_t>&& contents) {
170
172
auto ret = lzma_code (&stream, LZMA_RUN);
171
173
if (ret == LZMA_STREAM_END) {
172
174
if (stream.total_out != pheader.datasize ) {
175
+ lzma_end (&stream);
173
176
Reset ();
174
177
return false ;
175
178
}
@@ -182,9 +185,11 @@ bool Replay::OpenReplayFromBuffer(std::vector<uint8_t>&& contents) {
182
185
if (ret == LZMA_DATA_ERROR && stream.total_out == pheader.datasize )
183
186
break ;
184
187
Reset ();
188
+ lzma_end (&stream);
185
189
return false ;
186
190
}
187
191
}
192
+ lzma_end (&stream);
188
193
} else {
189
194
contents.erase (contents.begin (), contents.begin () + sizeof (pheader));
190
195
replay_data = std::move (contents);
You can’t perform that action at this time.
0 commit comments