D
dmjcunha
Hi, if I have:
struct rec2 {
int i;
};
struct rec1 {
struct rec2 two;
};
int func1(void) {
struct rec1 *one;
one = malloc(sizeof(struct rec1));
func2(&one->two);
/* here should I "free(one)" or that would
scramble func2 or any other damage... */
return 1;
}
Thanks in advance.
struct rec2 {
int i;
};
struct rec1 {
struct rec2 two;
};
int func1(void) {
struct rec1 *one;
one = malloc(sizeof(struct rec1));
func2(&one->two);
/* here should I "free(one)" or that would
scramble func2 or any other damage... */
return 1;
}
Thanks in advance.