After free()ing clientData, set it to NULL

We will change rfbClientCleanup() to free the data.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
pull/1/head
Johannes Schindelin 10 years ago
parent 7b9fc019de
commit bd811bdee9

@ -66,6 +66,7 @@ typedef struct ClientData {
static void clientgone(rfbClientPtr cl)
{
free(cl->clientData);
cl->clientData = NULL;
}
static enum rfbNewClientAction newclient(rfbClientPtr cl)

@ -172,6 +172,7 @@ static void* clientLoop(void* data) {
}
free(((clientData*)client->clientData)->display);
free(client->clientData);
client->clientData = NULL;
if(client->frameBuffer)
free(client->frameBuffer);
rfbClientCleanup(client);

Loading…
Cancel
Save