comparison src/os/linux/vm/os_linux.cpp @ 9059:17bf4d428955

8006103: [parfait] Possible null pointer dereference at hotspot/src/os/linux/vm/os_linux.cpp; os_windows.cpp; os_solaris.cpp; os_bsd.cpp Reviewed-by: zgu, iklam
author ccheung
date Wed, 03 Apr 2013 16:43:09 -0700
parents 14509df4cd63
children cc32ccaaf47f
comparison
equal deleted inserted replaced
9058:bad3bed4b323 9059:17bf4d428955
1645 snprintf(buffer, buflen, "lib%s.so", fname); 1645 snprintf(buffer, buflen, "lib%s.so", fname);
1646 retval = true; 1646 retval = true;
1647 } else if (strchr(pname, *os::path_separator()) != NULL) { 1647 } else if (strchr(pname, *os::path_separator()) != NULL) {
1648 int n; 1648 int n;
1649 char** pelements = split_path(pname, &n); 1649 char** pelements = split_path(pname, &n);
1650 if (pelements == NULL) {
1651 return false;
1652 }
1650 for (int i = 0 ; i < n ; i++) { 1653 for (int i = 0 ; i < n ; i++) {
1651 // Really shouldn't be NULL, but check can't hurt 1654 // Really shouldn't be NULL, but check can't hurt
1652 if (pelements[i] == NULL || strlen(pelements[i]) == 0) { 1655 if (pelements[i] == NULL || strlen(pelements[i]) == 0) {
1653 continue; // skip the empty path values 1656 continue; // skip the empty path values
1654 } 1657 }