GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Auto-port 5.0: IoUring: Correctly handle the case when malloc fails d… · netty/netty@962e8c8

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • transport-native-io_uring/src/main/c
    • netty_io_uring_native.c
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎transport-native-io_uring/src/main/c/netty_io_uring_native.c‎

Copy file name to clipboardExpand all lines: transport-native-io_uring/src/main/c/netty_io_uring_native.c
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,10 @@ static jintArray netty_io_uring_probe0(JNIEnv *env, jclass clazz, jint ring_fd)
283283
jintArray array = NULL;
284284
struct io_uring_probe *probe;
285285
size_t mallocLen = sizeof(*probe) + 256 * sizeof(struct io_uring_probe_op);
286-
probe = malloc(mallocLen);
286+
if ((probe = malloc(mallocLen)) == NULL) {
287+
netty_unix_errors_throwOutOfMemoryError(env);
288+
goto cleanup;
289+
}
287290
memset(probe, 0, mallocLen);
288291

289292
if (sys_io_uring_register(ring_fd, IORING_REGISTER_PROBE, probe, 256) < 0) {

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.