diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-02-02 13:20:52 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-02-02 13:20:52 -0800 |
commit | 3f1611b69f6b24184aa4b07c796526f49fa0db5f (patch) | |
tree | ad7ea77404804416bffb4a3037caf997fb50b6cb | |
parent | 5f0f8c00f47e778c59ae22bf685c97756456b2cd (diff) |
Make sure windowPath is properly initialized & freed
-rw-r--r-- | dpylist.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -172,6 +172,7 @@ RemoveDisplay (struct display *old) IfFree (d->from); XdmcpDisposeARRAY8 (&d->clientAddr); #endif + IfFree (d->windowPath); free ((char *) d); break; } @@ -184,7 +185,7 @@ NewDisplay (char *name, char *class) { struct display *d; - d = (struct display *) malloc (sizeof (struct display)); + d = (struct display *) calloc (1, sizeof (struct display)); if (!d) { LogOutOfMem ("NewDisplay"); return NULL; @@ -261,6 +262,9 @@ NewDisplay (char *name, char *class) d->xdmcpFd = -1; #endif d->version = 1; /* registered with The Open Group */ + d->willing = NULL; + d->dpy = NULL; + d->windowPath = NULL; displays = d; return d; } |