From: Matthew Fernandez Date: Fri, 2 Sep 2022 01:29:13 +0000 (-0700) Subject: smyrna new_attr_ref: fix unchecked allocation failure X-Git-Tag: 6.0.1~13^2~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=07b456c500b7e716ee06c0a9d62f616a74932aee;p=graphviz smyrna new_attr_ref: fix unchecked allocation failure --- diff --git a/cmd/smyrna/gui/frmobjectui.c b/cmd/smyrna/gui/frmobjectui.c index 6cedf0799..bfbacc947 100644 --- a/cmd/smyrna/gui/frmobjectui.c +++ b/cmd/smyrna/gui/frmobjectui.c @@ -101,7 +101,7 @@ static attr_t *new_attr_with_ref(Agsym_t * sym) static attr_t *new_attr_ref(attr_t * refAttr) { - attr_t *attr = malloc(sizeof(attr_t)); + attr_t *attr = gv_alloc(sizeof(attr_t)); *attr = *refAttr; attr->defValG = safestrdup(refAttr->defValG); attr->defValN = safestrdup(refAttr->defValN);