summaryrefslogtreecommitdiff
path: root/pango/pangofc-fontmap.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-03-18 23:25:19 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-03-18 23:43:42 -0400
commit4c02b0ad0a9d8f5fc3b09ae7ae45abf142f99d23 (patch)
treece7256f0120ce6110d20c96f2f7db610f162861d /pango/pangofc-fontmap.c
parent69a7dde587b14038cb6009608ed03618f0b3cbfd (diff)
downloadpango-4c02b0ad0a9d8f5fc3b09ae7ae45abf142f99d23.tar.gz
Use g_memdup2()memdup2
The g_memdup() function is replaced by a safer version in newer versions of GLib.
Diffstat (limited to 'pango/pangofc-fontmap.c')
-rw-r--r--pango/pangofc-fontmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index 5d5dfe55..16f10747 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -1745,7 +1745,7 @@ pango_fc_font_map_list_families (PangoFontMap *fontmap,
*n_families = priv->n_families;
if (families)
- *families = g_memdup (priv->families, priv->n_families * sizeof (PangoFontFamily *));
+ *families = g_memdup2 (priv->families, priv->n_families * sizeof (PangoFontFamily *));
}
static PangoFontFamily *
@@ -3262,7 +3262,7 @@ pango_fc_family_list_faces (PangoFontFamily *family,
*n_faces = fcfamily->n_faces;
if (faces)
- *faces = g_memdup (fcfamily->faces, fcfamily->n_faces * sizeof (PangoFontFace *));
+ *faces = g_memdup2 (fcfamily->faces, fcfamily->n_faces * sizeof (PangoFontFace *));
}
static PangoFontFace *