doc: fix typo
[platform/upstream/isl.git] / isl_printer.c
index 322244a..e0821f2 100644 (file)
@@ -163,15 +163,13 @@ static __isl_give isl_printer *str_print_isl_int(__isl_take isl_printer *p,
 {
        char *s;
        int len;
-       isl_int_print_gmp_free_t gmp_free;
 
        s = isl_int_get_str(i);
        len = strlen(s);
        if (len < p->width)
                p = str_print_indent(p, p->width - len);
        p = str_print(p, s, len);
-       mp_get_memory_functions(NULL, NULL, &gmp_free);
-       (*gmp_free)(s, len + 1);
+       isl_int_free_str(s);
        return p;
 }
 
@@ -362,6 +360,8 @@ __isl_give isl_printer *isl_printer_print_str(__isl_take isl_printer *p,
 {
        if (!p)
                return NULL;
+       if (!s)
+               return isl_printer_free(p);
 
        return p->ops->print_str(p, s);
 }