diff --git a/contrib/src/qt/0001-QArrayDataPointer-use-Data-deallocate-instead-of-raw.patch b/contrib/src/qt/0001-QArrayDataPointer-use-Data-deallocate-instead-of-raw.patch
new file mode 100644
index 0000000000000000000000000000000000000000..b95fd16d76573fcdb144c152771d415c173db81b
--- /dev/null
+++ b/contrib/src/qt/0001-QArrayDataPointer-use-Data-deallocate-instead-of-raw.patch
@@ -0,0 +1,34 @@
+From 37b0ea45fbdedbbbdfaa1734f6673e5db5f28cf1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Aur=C3=A9lien=20Brooke?= <aurelien@bahiasoft.fr>
+Date: Tue, 28 Jan 2025 08:14:01 +0100
+Subject: [PATCH] QArrayDataPointer: use Data::deallocate() instead of raw
+ free()
+
+Be symmetrical with the Data::allocate() in the constructor.
+
+This is not strictly a no-op since we now call the exported symbol
+QArrayData::deallocate() instead of inlining a free() call. However, it
+allows future sized-free optimizations.
+
+Change-Id: I2ef00a897f56a32a0f1188f69f159834e6ca5b64
+Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
+---
+ src/corelib/tools/qarraydatapointer.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/corelib/tools/qarraydatapointer.h b/src/corelib/tools/qarraydatapointer.h
+index 6657d40cf90..9f641462a28 100644
+--- a/src/corelib/tools/qarraydatapointer.h
++++ b/src/corelib/tools/qarraydatapointer.h
+@@ -107,7 +107,7 @@ public:
+     {
+         if (!deref()) {
+             (*this)->destroyAll();
+-            free(d);
++            Data::deallocate(d);
+         }
+     }
+ 
+-- 
+2.48.1
+
diff --git a/contrib/src/qt/rules.mak b/contrib/src/qt/rules.mak
index 3c44998e035f8b42331c3cce729ca6f0383c543f..18b1dacec5af1ba74ab5dc72a8fb16b014cc61ae 100644
--- a/contrib/src/qt/rules.mak
+++ b/contrib/src/qt/rules.mak
@@ -54,6 +54,7 @@ qt: qtbase-everywhere-src-$(QTBASE_VERSION_FULL).tar.xz .sum-qt
 	$(APPLY) $(SRC)/qt/0001-disable-precompiled-headers-when-forcing-WINVER-inte.patch
 	$(APPLY) $(SRC)/qt/0001-Use-DirectWrite-font-database-only-with-Windows-10-a.patch
 	$(APPLY) $(SRC)/qt/0003-Do-not-link-D3D9.patch
+	$(APPLY) $(SRC)/qt/0001-QArrayDataPointer-use-Data-deallocate-instead-of-raw.patch
 	$(MOVE)
 
 ifdef HAVE_WIN32