pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc

The API is documented as returning NULL on error, so exploit that
constraint on the caller to actually implement that behaviour.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Iaee36079909bc4e2e59c6a1df50120c9be68cd0e
diff --git a/src/pdr.c b/src/pdr.c
index a58a2cc..be8b2fe 100644
--- a/src/pdr.c
+++ b/src/pdr.c
@@ -489,7 +489,9 @@
 {
 	pldm_entity_association_tree *tree =
 		malloc(sizeof(pldm_entity_association_tree));
-	assert(tree != NULL);
+	if (!tree) {
+		return NULL;
+	}
 	tree->root = NULL;
 	tree->last_used_container_id = 0;