qssb_free_policy(): Allow passing NULL
Dieser Commit ist enthalten in:
Ursprung
55ec51ba21
Commit
a585db7778
15
qssb.h
15
qssb.h
@ -417,14 +417,17 @@ static int mount_to_chroot(const char *chroot_target_path, struct qssb_path_poli
|
|||||||
*/
|
*/
|
||||||
void qssb_free_policy(struct qssb_policy *ctxt)
|
void qssb_free_policy(struct qssb_policy *ctxt)
|
||||||
{
|
{
|
||||||
struct qssb_path_policy *current = ctxt->path_policies;
|
if(ctxt != NULL)
|
||||||
while(current)
|
|
||||||
{
|
{
|
||||||
struct qssb_path_policy *tmp = current;
|
struct qssb_path_policy *current = ctxt->path_policies;
|
||||||
current = current->next;
|
while(current != NULL)
|
||||||
free(tmp);
|
{
|
||||||
|
struct qssb_path_policy *tmp = current;
|
||||||
|
current = current->next;
|
||||||
|
free(tmp);
|
||||||
|
}
|
||||||
|
free(ctxt);
|
||||||
}
|
}
|
||||||
free(ctxt);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enters the specified namespaces */
|
/* Enters the specified namespaces */
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren