Skip to content

Commit

Permalink
Add nil check in recvfd (#910)
Browse files Browse the repository at this point in the history
  • Loading branch information
edwarnicke authored May 7, 2021
1 parent bd1ff8b commit 1c92df8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/networkservice/common/mechanisms/recvfd/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ func recvFDAndSwapInodeToFile(ctx context.Context, fileMap *perConnectionFileMap
// any of the other chain elements using the information, and since that filename will be
// file:///proc/${pid}/fd/${fd} we need to remember it because each time we get it from the
// grpcfd.Recver it will be a *different* fd and thus a different filename
if file == nil {
err = errors.Wrapf(ctx.Err(), "nil file received for %s", inodeURLStr)
return
}
fileMap.filesByInodeURL[inodeURL.String()] = file
}
}
Expand Down

0 comments on commit 1c92df8

Please sign in to comment.