home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_11_03
/
1103092a
< prev
next >
Wrap
Text File
|
1993-01-06
|
794b
|
30 lines
int SomeFunc(void)
{
char *buf1, *buf2, *buf3;
int ccode;
if ((buf1 = malloc(1024)) == NULL)
{
ccode = -1;
goto End1;
}
if ((buf2 = malloc(1024)) == NULL)
{
ccode = -1;
goto End2;
}
if ((buf3 = malloc(1024)) == NULL)
{
ccode = -1;
goto End3;
}
// More code here
End3:
free(buf3);
End2:
free(buf2);
End1:
free(buf1);
return(ccode);
}