Skip to content

Commit 26c81c6

Browse files
committed
PosixResources: guard against null paths
1 parent b98b9c7 commit 26c81c6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/PosixResources.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ public Process destroyForcibly() {
145145
}
146146

147147
private static class ChannelWrapper {
148-
public Channel channel;
149-
public int cnt;
148+
Channel channel;
149+
int cnt;
150150

151151
ChannelWrapper() {
152152
this(null, 0);
@@ -213,7 +213,9 @@ private void addFD(int fd, Channel channel) {
213213
@TruffleBoundary
214214
private void addFD(int fd, Channel channel, String path) {
215215
files.put(fd, new ChannelWrapper(channel));
216-
filePaths.put(fd, path);
216+
if (path != null) {
217+
filePaths.put(fd, path);
218+
}
217219
}
218220

219221
@TruffleBoundary

0 commit comments

Comments
 (0)