if(output != NULL) { free(output); printf("YES - output was free()ed\n"); }