>>856
ポインタがインスタンスを指していないんじゃないんか?
a1 = malloc( sizeof(struct A) );
a1->b = malloc( sizeof (struct B) );