diff options
Diffstat (limited to 'thirdparty/harfbuzz/src/graph/gsubgpos-context.cc')
-rw-r--r-- | thirdparty/harfbuzz/src/graph/gsubgpos-context.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/thirdparty/harfbuzz/src/graph/gsubgpos-context.cc b/thirdparty/harfbuzz/src/graph/gsubgpos-context.cc index b2044426d4..d66eb49cfd 100644 --- a/thirdparty/harfbuzz/src/graph/gsubgpos-context.cc +++ b/thirdparty/harfbuzz/src/graph/gsubgpos-context.cc @@ -52,7 +52,11 @@ unsigned gsubgpos_graph_context_t::create_node (unsigned size) if (!buffer) return -1; - add_buffer (buffer); + if (!add_buffer (buffer)) { + // Allocation did not get stored for freeing later. + hb_free (buffer); + return -1; + } return graph.new_node (buffer, buffer + size); } |