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

gah! the putenv() stuff was not causing memleaks. Only 2 memleaks after all (1 serious, 1 minor). Both did sum up in time

This commit is contained in:
dan
2002-03-01 10:33:14 +00:00
parent efb0090f8c
commit f857012f7a

View File

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