1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00

Fix potential segfault on malloc failure

[originally from svn r323]
This commit is contained in:
Simon Tatham 1999-11-17 14:22:12 +00:00
parent 5fa57669ec
commit 55b8c21f0f

View File

@ -678,8 +678,10 @@ static int WINAPI WndProc (HWND hwnd, UINT message,
cl = malloc(16 + strlen(session)); /* 8, but play safe */
if (!cl)
cl = NULL; /* not a very important failure mode */
sprintf(cl, "putty @%s", session);
freecl = TRUE;
else {
sprintf(cl, "putty @%s", session);
freecl = TRUE;
}
} else
cl = NULL;