comparison src/os/solaris/vm/os_solaris.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 15401203db6b
children cc32ccaaf47f
comparison
equal deleted inserted replaced
9058:bad3bed4b323 9059:17bf4d428955
1901 snprintf(buffer, buflen, "lib%s.so", fname); 1901 snprintf(buffer, buflen, "lib%s.so", fname);
1902 retval = true; 1902 retval = true;
1903 } else if (strchr(pname, *os::path_separator()) != NULL) { 1903 } else if (strchr(pname, *os::path_separator()) != NULL) {
1904 int n; 1904 int n;
1905 char** pelements = split_path(pname, &n); 1905 char** pelements = split_path(pname, &n);
1906 if (pelements == NULL) {
1907 return false;
1908 }
1906 for (int i = 0 ; i < n ; i++) { 1909 for (int i = 0 ; i < n ; i++) {
1907 // really shouldn't be NULL but what the heck, check can't hurt 1910 // really shouldn't be NULL but what the heck, check can't hurt
1908 if (pelements[i] == NULL || strlen(pelements[i]) == 0) { 1911 if (pelements[i] == NULL || strlen(pelements[i]) == 0) {
1909 continue; // skip the empty path values 1912 continue; // skip the empty path values
1910 } 1913 }