MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mac_ip6q_label_alloc

Function mac_ip6q_label_alloc

freebsd/security/mac/mac_inet6.c:63–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61#include <security/mac/mac_policy.h>
62
63static struct label *
64mac_ip6q_label_alloc(int flag)
65{
66 struct label *label;
67 int error;
68
69 label = mac_labelzone_alloc(flag);
70 if (label == NULL)
71 return (NULL);
72
73 if (flag & M_WAITOK)
74 MAC_POLICY_CHECK(ip6q_init_label, label, flag);
75 else
76 MAC_POLICY_CHECK_NOSLEEP(ip6q_init_label, label, flag);
77 if (error) {
78 MAC_POLICY_PERFORM_NOSLEEP(ip6q_destroy_label, label);
79 mac_labelzone_free(label);
80 return (NULL);
81 }
82 return (label);
83}
84
85int
86mac_ip6q_init(struct ip6q *q6, int flag)

Callers 1

mac_ip6q_initFunction · 0.85

Calls 2

mac_labelzone_allocFunction · 0.85
mac_labelzone_freeFunction · 0.85

Tested by

no test coverage detected