isl_output.c: print_qpolynomial_c: improve error handling
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 30 May 2013 16:30:22 +0000 (18:30 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Mon, 10 Jun 2013 07:52:39 +0000 (09:52 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_output.c

index a1feb7f..e9bc58f 100644 (file)
@@ -1361,6 +1361,8 @@ static __isl_give isl_printer *print_qpolynomial_c(__isl_take isl_printer *p,
        }
        if (qp)
                p = upoly_print(qp->upoly, dim, qp->div, p, 0);
+       else
+               p = isl_printer_free(p);
        if (!isl_int_is_one(den)) {
                p = isl_printer_print_str(p, ")/");
                p = isl_printer_print_isl_int(p, den);