Definir ponteiro de estrutura para NULL na função em C

Eu tento liberar o ponteiro da estrutura usando a função e, em seguida, verifique se há NULL. Isso não funciona!

typedef struct{
    int * num;
} D;

void freeD(D * a){
    free(a->num);
    free(a);
    a=NULL;
}
int main(){
    D * smth = malloc(sizeof(D));
    smth->num = malloc(sizeof(int)*2);
    freeD(smth);
    if(smth==NULL){
    printf("It's NULL");
    }
}

questionAnswers(2)

yourAnswerToTheQuestion