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

Function mac_ipq_label_alloc

freebsd/security/mac/mac_inet.c:111–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111static struct label *
112mac_ipq_label_alloc(int flag)
113{
114 struct label *label;
115 int error;
116
117 label = mac_labelzone_alloc(flag);
118 if (label == NULL)
119 return (NULL);
120
121 if (flag & M_WAITOK)
122 MAC_POLICY_CHECK(ipq_init_label, label, flag);
123 else
124 MAC_POLICY_CHECK_NOSLEEP(ipq_init_label, label, flag);
125 if (error) {
126 MAC_POLICY_PERFORM_NOSLEEP(ipq_destroy_label, label);
127 mac_labelzone_free(label);
128 return (NULL);
129 }
130 return (label);
131}
132
133int
134mac_ipq_init(struct ipq *q, int flag)

Callers 1

mac_ipq_initFunction · 0.85

Calls 2

mac_labelzone_allocFunction · 0.85
mac_labelzone_freeFunction · 0.85

Tested by

no test coverage detected