1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 04:48:06 +01:00

fixed some memleaks (1 serious, 5 minor)

This commit is contained in:
dan
2002-03-01 10:03:35 +00:00
parent 1cd1f16c3c
commit efb0090f8c
3 changed files with 14 additions and 6 deletions

View File

@@ -245,12 +245,14 @@ SetupEnvironment(WScreen *scr)
*ptr = 0;
snprintf(buf, sizeof(buf), ".%i", scr->screen);
strcat(tmp, buf);
putenv(tmp);
putenv(tmp);
wfree(tmp);
}
tmp = wmalloc(60);
snprintf(tmp, 60, "WRASTER_COLOR_RESOLUTION%i=%i", scr->screen,
scr->rcontext->attribs->colors_per_channel);
putenv(tmp);
wfree(tmp);
}
@@ -595,6 +597,7 @@ main(int argc, char **argv)
str = wstrconcat("WMAKER_BIN_NAME=", argv[0]);
putenv(str);
wfree(str);
ArgCount = argc;
Arguments = argv;
@@ -782,6 +785,7 @@ main(int argc, char **argv)
snprintf(str, len, "DISPLAY=%s", DisplayName);
}
putenv(str);
wfree(str);
#ifdef DEBUG
if (doSync)