From: Matthew Fernandez Date: Sat, 14 Nov 2020 19:49:12 +0000 (-0800) Subject: anticipate tight_subtree_search() returning a negative value as error X-Git-Tag: 2.46.1~31^2~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=62404ac9ebde8c4ebf6c7b66b8c7799e90ab5e51;p=graphviz anticipate tight_subtree_search() returning a negative value as error Related to #1801. --- diff --git a/lib/common/ns.c b/lib/common/ns.c index e47ec6616..0f88c0511 100644 --- a/lib/common/ns.c +++ b/lib/common/ns.c @@ -298,6 +298,10 @@ static subtree_t *find_tight_subtree(Agnode_t *v) rv = NEW(subtree_t); rv->rep = v; rv->size = tight_subtree_search(v,rv); + if (rv->size < 0) { + free(rv); + return NULL; + } rv->par = rv; return rv; }