Life after free?
Al Dunbar
userAKDU at mts.ucs.UAlberta.CA
Fri Sep 28 13:10:50 AEST 1990
In article <quan.654410256 at sol>, quan at sol.surv.utas.oz (Stephen Quan) writes:
>char *funny(ch)
>char ch;
>{
> char *tmp;
> int i;
>
> tmp = (char *) malloc(100);
> for (i=0; i<=99 ; i++) *(tmp+i) = ch;
> free(tmp);
> return tmp;
>}
>
>Any comments on free-ing tmp before it is return-ed?
>
>Stephen Quan (quan at sol.surv.utas.edu.au)
>University of Tasmania.
You have, perhaps, a death-wish?
-------------------+-------------------------------------------
Al Dunbar |
Edmonton, Alberta | this space for rent
CANADA |
-------------------+-------------------------------------------
More information about the Comp.lang.c
mailing list