diff 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
line wrap: on
line diff
--- a/src/pst2ldif.cpp	Fri Dec 27 09:01:31 2013 -0800
+++ b/src/pst2ldif.cpp	Mon Mar 09 08:49:47 2015 -0700
@@ -463,7 +463,9 @@
         else {
             if (i > (len-5)) {
                 len += 256;
-                address = (char *)realloc(address, len);
+                char *addr = (char *)realloc(address, len);  // cppcheck found unchecked error
+                if (!addr) exit(3);
+                address = addr;
             }
             if (newline_flag) {
                 address[i++] = '$';