par->cmap_type = cmap_gxt2000;
        } else if (of_node_name_prefix(dp, "vga,Display-")) {
                /* Look for AVIVO initialized by SLOF */
-               struct device_node *pciparent = of_get_parent(dp);
+               struct device_node *pciparent __free(device_node) = of_get_parent(dp);
                const u32 *vid, *did;
                vid = of_get_property(pciparent, "vendor-id", NULL);
                did = of_get_property(pciparent, "device-id", NULL);
                        if (par->cmap_adr)
                                par->cmap_type = cmap_avivo;
                }
-               of_node_put(pciparent);
        } else if (dp && of_device_is_compatible(dp, "qemu,std-vga")) {
 #ifdef __BIG_ENDIAN
                const __be32 io_of_addr[3] = { 0x01000000, 0x0, 0x0 };