Ticket #8544: leaks-and-indentation.diff
File leaks-and-indentation.diff, 1.6 KB (added by , 18 years ago) |
---|
-
common/file.cpp
249 249 if (CFURLGetFileSystemRepresentation(fileUrl, false, (UInt8 *)buf, 256)) { 250 250 _handle = fopen((char *)buf, modeStr); 251 251 } 252 CFRelease(fileUrl); 252 253 } 254 CFRelease(cfFileName); 253 255 } 254 256 #endif 255 257 -
common/unzip.cpp
326 326 327 327 int err=UNZ_OK; 328 328 329 if (unz_copyright[0]!=' ') 330 return NULL; 331 332 if (!us->file.open(path)) 329 if (!us->file.open(path)) { 330 delete us; 333 331 return NULL; 332 } 334 333 335 334 central_pos = unzlocal_SearchCentralDir(us->file); 336 335 if (central_pos==0) … … 361 360 err=UNZ_ERRNO; 362 361 363 362 if ((number_entry_CD!=us->gi.number_entry) || 364 365 363 (number_disk_with_CD!=0) || 364 (number_disk!=0)) 366 365 err=UNZ_BADZIPFILE; 367 366 368 367 /* size of the central directory */ … … 379 378 err=UNZ_ERRNO; 380 379 381 380 if ((central_pos<us->offset_central_dir+us->size_central_dir) && 382 381 (err==UNZ_OK)) 383 382 err=UNZ_BADZIPFILE; 384 383 385 if (err!=UNZ_OK) 386 { 384 if (err!=UNZ_OK) { 387 385 us->file.close(); 388 386 delete us; 389 387 return NULL; … … 411 409 return UNZ_PARAMERROR; 412 410 s=(unz_s*)file; 413 411 414 415 412 if (s->pfile_in_zip_read!=NULL) 413 unzCloseCurrentFile(file); 416 414 417 415 s->file.close(); 418 416 delete s;