diff --git a/examples/sock/hello_world/hello_sock.c b/examples/sock/hello_world/hello_sock.c index 6d1d80a81..de309f2cf 100644 --- a/examples/sock/hello_world/hello_sock.c +++ b/examples/sock/hello_world/hello_sock.c @@ -331,7 +331,7 @@ hello_sock_accept_poll(void *arg) rc = spdk_sock_getaddr(sock, saddr, sizeof(saddr), &sport, caddr, sizeof(caddr), &cport); if (rc < 0) { SPDK_ERRLOG("Cannot get connection addresses\n"); - spdk_sock_close(&ctx->sock); + spdk_sock_close(&sock); return SPDK_POLLER_IDLE; }