DTC: Fix memory leak on flatname.

If flatname was not referenced by the "node" structure, the reference to the
allocated string is lost at function exit.

We need to free it if is not used by "node".

Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
diff --git a/flattree.c b/flattree.c
index ec14954..089b976 100644
--- a/flattree.c
+++ b/flattree.c
@@ -797,6 +797,10 @@
 		}
 	} while (val != FDT_END_NODE);
 
+	if (node->name != flatname) {
+		free(flatname);
+	}
+
 	return node;
 }