Skip to content

Commit

Permalink
posix shm, init fd to -1, check shmemptr instead of shmemfd
Browse files Browse the repository at this point in the history
  • Loading branch information
jsorg71 committed Sep 4, 2023
1 parent 03b3d7f commit 90801a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion module/rdpClientCon.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ rdpClientConGotConnection(ScreenPtr pScreen, rdpPtr dev)
clientCon->shmemstatus = SHM_UNINITIALIZED;
clientCon->updateRetries = 0;
clientCon->dev = dev;
clientCon->shmemfd = -1;
dev->last_event_time_ms = GetTimeInMillis();
dev->do_dirty_ons = 1;

Expand Down Expand Up @@ -698,7 +699,7 @@ rdpClientConAllocateSharedMemory(rdpClientCon *clientCon, int bytes)
clientCon->shmemfd));
return;
}
if (clientCon->shmemfd != -1)
if (clientCon->shmemptr != NULL)
{
g_free_unmap_fd(clientCon->shmemptr,
clientCon->shmemfd,
Expand Down

0 comments on commit 90801a4

Please sign in to comment.