##// END OF EJS Templates
zstd: prevent potential free() of uninitialized memory...
Gregory Szorc -
r30830:08fa3a76 default
parent child Browse files
Show More
@@ -258,6 +258,9 b' static PyObject* ZstdCompressor_copy_str'
258 258 return NULL;
259 259 }
260 260
261 /* Prevent free on uninitialized memory in finally. */
262 output.dst = NULL;
263
261 264 cstream = CStream_from_ZstdCompressor(self, sourceSize);
262 265 if (!cstream) {
263 266 res = NULL;
@@ -165,6 +165,9 b' static PyObject* Decompressor_copy_strea'
165 165 return NULL;
166 166 }
167 167
168 /* Prevent free on uninitialized memory in finally. */
169 output.dst = NULL;
170
168 171 dstream = DStream_from_ZstdDecompressor(self);
169 172 if (!dstream) {
170 173 res = NULL;
General Comments 0
You need to be logged in to leave comments. Login now