| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | free()/sys3175 |
Hello Phil!
12 Aug 95 21:16, Phil Crown wrote to All:
PC> *** Changed by Daniel Lynes (1:153/9108), 12 Aug 95 21:16.
PC> Anybody see any obvious problems with the following code?
PC> Calling free(Track_Buffer) under OS/2 causes SYS3175, under DOS
PC> there are no apparent problems.
.
.
// Track_Buffer[i] = *(ptr + i);
Track_Buffer[head] = '\0';
The above may be your problem. (That and the strncpy() function)...what's
probably going on here, is that you're not keeping the original pointer. You're
writing over the pointer for Track_Buffer, with that of ptr, so the free
function is no longer looking at an allocate buffer. It's trying to free a
null pointer. DOS _should_ actually exit with an error of 'null pointer'.
... After they make styrofoam, what do they ship it in?
--- GoldED/2 2.42.G0615
* Origin: Enitharmon/2 Beta Home Site 604-589-9681 (1:153/9108)SEEN-BY: 105/42 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407 SEEN-BY: 515 628 704 713/888 800/1 7877/2809 @PATH: 153/9108 7082 923 7041 752 716 920 270/101 105/103 42 712/515 @PATH: 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.