Only check ID of profile if profile exists
Only check ID of profile if profile exists

Freeing a default policy, which has no profile assigned, was causing a segfault.

OpenSCAP/openscap,mpreisler/openscap,redhatrises/openscap,jan-cerny/openscap,redhatrises/openscap,redhatrises/openscap,OpenSCAP/openscap,mpreisler/openscap,Hexadorsimal/openscap,Hexadorsimal/openscap,jan-cerny/openscap,mpreisler/openscap,jan-cerny/openscap,mpreisler/openscap,mpreisler/openscap,Hexadorsimal/openscap,OpenSCAP/openscap,mpreisler/openscap,Hexadorsimal/openscap,jan-cerny/openscap,Hexadorsimal/openscap,jan-cerny/openscap,Hexadorsimal/openscap,redhatrises/openscap,OpenSCAP/openscap,redhatrises/openscap,redhatrises/openscap,OpenSCAP/openscap,OpenSCAP/openscap,jan-cerny/openscap