mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 00:38:06 +02:00
script: Free the correct pattern after failure.
The error path attempted to free the resolved pattern which it had just discovered was NULL and not the locally allocated pattern...
This commit is contained in:
parent
bc2d0ad114
commit
2b312806f1
1 changed files with 1 additions and 1 deletions
|
|
@ -1894,7 +1894,7 @@ _ft_create_for_pattern (csi_t *ctx,
|
|||
/* prior to 1.9, you needed to pass a resolved pattern */
|
||||
resolved = FcFontMatch (NULL, pattern, NULL);
|
||||
if (_csi_unlikely (resolved == NULL)) {
|
||||
FcPatternDestroy (resolved);
|
||||
FcPatternDestroy (pattern);
|
||||
return _csi_error (CSI_STATUS_NO_MEMORY);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue