Mercurial > hg > graal-jvmci-8
comparison src/os/bsd/vm/os_bsd.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 | 252ad8d5f22b |
children | cc32ccaaf47f |
comparison
equal
deleted
inserted
replaced
9058:bad3bed4b323 | 9059:17bf4d428955 |
---|---|
1212 snprintf(buffer, buflen, JNI_LIB_PREFIX "%s" JNI_LIB_SUFFIX, fname); | 1212 snprintf(buffer, buflen, JNI_LIB_PREFIX "%s" JNI_LIB_SUFFIX, fname); |
1213 retval = true; | 1213 retval = true; |
1214 } else if (strchr(pname, *os::path_separator()) != NULL) { | 1214 } else if (strchr(pname, *os::path_separator()) != NULL) { |
1215 int n; | 1215 int n; |
1216 char** pelements = split_path(pname, &n); | 1216 char** pelements = split_path(pname, &n); |
1217 if (pelements == NULL) { | |
1218 return false; | |
1219 } | |
1217 for (int i = 0 ; i < n ; i++) { | 1220 for (int i = 0 ; i < n ; i++) { |
1218 // Really shouldn't be NULL, but check can't hurt | 1221 // Really shouldn't be NULL, but check can't hurt |
1219 if (pelements[i] == NULL || strlen(pelements[i]) == 0) { | 1222 if (pelements[i] == NULL || strlen(pelements[i]) == 0) { |
1220 continue; // skip the empty path values | 1223 continue; // skip the empty path values |
1221 } | 1224 } |