Fix NULL pointer dereference in libgpo when listing Local Policy which has no securit...
[ira/wip.git] / libgpo / gpo_util.c
index 7a23b5cbd37c6ea33024df4ee581779ca0de416e..fdf4c6d1af11003c2b701c588db471785bdb4ea1 100644 (file)
@@ -321,10 +321,11 @@ void dump_gpo(ADS_STRUCT *ads,
                }
                dump_gp_ext(gp_ext, lvl);
        }
+       if (gpo->security_descriptor) {
+               DEBUGADD(lvl,("security descriptor:\n"));
 
-       DEBUGADD(lvl,("security descriptor:\n"));
-
-       NDR_PRINT_DEBUG(security_descriptor, gpo->security_descriptor);
+               NDR_PRINT_DEBUG(security_descriptor, gpo->security_descriptor);
+       }
 }
 
 /****************************************************************