summaryrefslogtreecommitdiff
path: root/src/win32
diff options
context:
space:
mode:
authorLuca Bacci <luca.bacci982@gmail.com>2022-09-03 13:05:44 +0200
committerLuca Bacci <luca.bacci982@gmail.com>2022-09-03 14:16:04 +0200
commit8266d2d5f2d595ab4f77d6b5e08603b683141eb6 (patch)
tree7c6bff2559f27ba5223aef2ba62aeee0bc650ccc /src/win32
parent716c216ebcd7634fd95a51b748d1cbd36ab2fbaf (diff)
downloadcairo-8266d2d5f2d595ab4f77d6b5e08603b683141eb6.tar.gz
Pair usage of operator new[] with a corresponding delete[]
Diffstat (limited to 'src/win32')
-rw-r--r--src/win32/cairo-dwrite-font.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/win32/cairo-dwrite-font.cpp b/src/win32/cairo-dwrite-font.cpp
index c58827555..ea87fe7e1 100644
--- a/src/win32/cairo-dwrite-font.cpp
+++ b/src/win32/cairo-dwrite-font.cpp
@@ -330,7 +330,7 @@ _cairo_dwrite_font_face_create_for_toy (cairo_toy_font_face_t *toy_face,
MultiByteToWideChar(CP_UTF8, 0, toy_face->family, -1, face_name, face_name_len);
RefPtr<IDWriteFontFamily> family = DWriteFactory::FindSystemFontFamily(face_name);
- delete face_name;
+ delete[] face_name;
if (!family) {
/* If the family is not found, use the default that should always exist. */
face_name_len = MultiByteToWideChar(CP_UTF8, 0, CAIRO_FONT_FAMILY_DEFAULT, -1, NULL, 0);
@@ -338,7 +338,7 @@ _cairo_dwrite_font_face_create_for_toy (cairo_toy_font_face_t *toy_face,
MultiByteToWideChar(CP_UTF8, 0, CAIRO_FONT_FAMILY_DEFAULT, -1, face_name, face_name_len);
family = DWriteFactory::FindSystemFontFamily(face_name);
- delete face_name;
+ delete[] face_name;
if (!family) {
*font_face = (cairo_font_face_t*)&_cairo_font_face_nil;
return (cairo_status_t)CAIRO_INT_STATUS_UNSUPPORTED;