comparison src/pst2ldif.cpp @ 344:aedcf979f439

fix unchecked errors found by cppcheck
author Carl Byington <carl@five-ten-sg.com>
date Mon, 09 Mar 2015 08:49:47 -0700
parents 201464dd356e
children
comparison
equal deleted inserted replaced
343:2079fc3460c2 344:aedcf979f439
461 continue; 461 continue;
462 } 462 }
463 else { 463 else {
464 if (i > (len-5)) { 464 if (i > (len-5)) {
465 len += 256; 465 len += 256;
466 address = (char *)realloc(address, len); 466 char *addr = (char *)realloc(address, len); // cppcheck found unchecked error
467 if (!addr) exit(3);
468 address = addr;
467 } 469 }
468 if (newline_flag) { 470 if (newline_flag) {
469 address[i++] = '$'; 471 address[i++] = '$';
470 newline_flag = false; 472 newline_flag = false;
471 space_flag = false; 473 space_flag = false;