diff --git a/src/parse_functions.c b/src/parse_functions.c index b1f0798b..fd53379e 100644 --- a/src/parse_functions.c +++ b/src/parse_functions.c @@ -803,9 +803,6 @@ static enum node_flavor attr_to_node_flavor(enum attr_flavor flavor) static enum selint_error insert_attribute(struct policy_node **cur, enum attr_flavor flavor, const char *type, struct string_list *attrs, unsigned int lineno) { struct attribute_data *data = xcalloc(1, sizeof(struct attribute_data)); - if (!data) { - return SELINT_OUT_OF_MEM; - } union node_data nd; nd.at_data = data; diff --git a/src/tree.c b/src/tree.c index 4a9d9451..92cd482e 100644 --- a/src/tree.c +++ b/src/tree.c @@ -32,10 +32,6 @@ enum selint_error insert_policy_node_child(struct policy_node *parent, } struct policy_node *to_insert = xmalloc(sizeof(struct policy_node)); - if (!to_insert) { - return SELINT_OUT_OF_MEM; - } - to_insert->parent = parent; to_insert->next = NULL; to_insert->first_child = NULL; @@ -73,9 +69,6 @@ enum selint_error insert_policy_node_next(struct policy_node *prev, } struct policy_node *to_insert = xmalloc(sizeof(struct policy_node)); - if (!to_insert) { - return SELINT_OUT_OF_MEM; - } prev->next = to_insert;