First I don't understand the need to clone trees, having same data in two different places often cause problems than solving problems. Do you have a reason to do so?
sink = NULL;
Do you really expect this to free the memory you allocated? If so, you may have to go and read your c book again
May be you'll have to check before you recurs again
sink->val = source->val;
if(source->left){
sink->left = malloc(sizeof(tree));
copy_tree (sink->left, source->left);
}else{
sink->left = NULL;
}
if(source->right){
sink->right = malloc(sizeof(tree));
copy_tree (sink->right, source->right);
}else{
sink->right = NULL;
}
Please don't PM for answers