]> granicus.if.org Git - graphviz/commitdiff
remove an unnecessary NULL guard on a call to free
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 4 Jun 2021 00:26:07 +0000 (17:26 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 9 Jun 2021 14:18:53 +0000 (07:18 -0700)
Calling free on NULL is a well-defined no-op.

lib/common/htmlparse.y

index 4571c0c322d7d3880ca76d7a1f95eb896581aea3..1f1bf0d6e144747dca7e0d4311f7594b3cf084da 100644 (file)
@@ -142,7 +142,7 @@ free_fspan(Dt_t* d, fspan* p, Dtdisc_t* ds)
        int i;
        ti = p->lp.items;
        for (i = 0; i < p->lp.nitems; i++) {
-           if (ti->str) free (ti->str);
+           free (ti->str);
            ti++;
        }
        free (p->lp.items);