Skip to content

Commit 7a6c115

Browse files
authored
fix ZipUtils memory-malloc succ check error. (#19923) (#19953)
1 parent 29ce64b commit 7a6c115

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cocos/base/ZipUtils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ int ZipUtils::inflateGZipFile(const char *path, unsigned char **out)
267267
unsigned int totalBufferSize = bufferSize;
268268

269269
*out = (unsigned char*)malloc( bufferSize );
270-
if( ! out )
270+
if(*out == NULL)
271271
{
272272
CCLOG("cocos2d: ZipUtils: out of memory");
273273
return -1;

0 commit comments

Comments
 (0)