| delorie.com/archives/browse.cgi | search |
| Message-Id: | <199711122340.SAA13067@delorie.com> |
| From: | "sl" <SL AT usemail DOT com> |
| To: | "DJGPP mailing list" <djgpp AT delorie DOT com> |
| Date: | Wed, 12 Nov 97 18:44:49 |
| Reply-To: | "sl" <SL AT usemail DOT com> |
| MIME-Version: | 1.0 |
| Subject: | getcwd() |
Hi, I just thought of something. Since getcwd(NULL, 0) malloc()s its own variable. Does executing the following code pose a problem? (...) char result[MAX_PATH]; strcmp(result, getcwd(NULL, 0)); (...) Does this cause a pointer to be lost forever? Is a "free()" missing here on the result of getcwd()? Gili
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |