diff --git a/src/ut-stubs/osapi-utstub-sockets.c b/src/ut-stubs/osapi-utstub-sockets.c index 5c16725a5..033604bfa 100644 --- a/src/ut-stubs/osapi-utstub-sockets.c +++ b/src/ut-stubs/osapi-utstub-sockets.c @@ -37,7 +37,7 @@ int32 OS_SocketOpen(uint32 *sock_id, OS_SocketDomain_t Domain, OS_SocketType_t T if (status == OS_SUCCESS) { - status = UT_AllocStubObjId(UT_OBJTYPE_SOCKET); + *sock_id = UT_AllocStubObjId(UT_OBJTYPE_SOCKET); } return status;