Do some checks about data passed to this function
[metze/samba/wip.git] / source3 / lib / privileges.c
index a3b85372c7f35247d439f2c9ed4f53384da4aff4..cd888b6513341961b64d2f65ebeb9ca0fd607c66 100644 (file)
@@ -170,6 +170,9 @@ void reset_privilege(PRIVILEGE_SET *priv_set)
 
 void destroy_privilege(PRIVILEGE_SET **priv_set)
 {
+       if (priv_set == NULL || *priv_set == NULL)
+               return;
+
        reset_privilege(*priv_set);
        if (!((*priv_set)->ext_ctx))
                /* mem_ctx is local, destroy it */