]> granicus.if.org Git - graphviz/commit
check for allocation failure in Vector_new
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 30 Jun 2020 02:26:12 +0000 (19:26 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 30 Jun 2020 02:36:00 +0000 (19:36 -0700)
commit0928e94bf54ac88fbabf129cc77bbd87728abbc8
tree7893b3019151d6915903a7ffbc80536b30c383ef
parentc0c58768b51f26383ddf5110fc1ccae7c9eb200a
check for allocation failure in Vector_new

This function checked if its second allocation to the vector's backing array
failed, but did not check if the original data structure allocation failed. It
is somewhat unlikely callers are currently equipped to handle this failure
anyway, but we may as well be consistent here.
lib/sparse/vector.c