From 0ffd44874ef69d6ad9b9749ecc9b0f8ae7bb8a71 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Sat, 30 Aug 2025 04:12:05 +0000 Subject: [PATCH] [autofix.ci] apply automated fixes --- src/bun.js/bindings/JSYogaNode.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bun.js/bindings/JSYogaNode.cpp b/src/bun.js/bindings/JSYogaNode.cpp index 1604186b42..40522c1f9e 100644 --- a/src/bun.js/bindings/JSYogaNode.cpp +++ b/src/bun.js/bindings/JSYogaNode.cpp @@ -23,13 +23,13 @@ JSYogaNode::~JSYogaNode() if (m_node) { // Clear the context pointer to avoid callbacks during cleanup YGNodeSetContext(m_node, nullptr); - + // Remove from parent to avoid use-after-free when parent tries to clear owner YGNodeRef parent = YGNodeGetParent(m_node); if (parent) { YGNodeRemoveChild(parent, m_node); } - + YGNodeFree(m_node); clearInternal(); }