Closed maddin200 closed 3 years ago
/src/graphics.c line 2583:
pixGetDimensions(pixs, &w, &h, NULL); xstart = (l_int32 )LEPT_CALLOC(L_MAX(1, w / 2), sizeof(l_int32)); xend = (l_int32 )LEPT_CALLOC(L_MAX(1, w / 2), sizeof(l_int32)); if (!xstart) // <-- missing LEPT_FREE(xend); return (PIX *)ERROR_PTR("xstart and xend not made", procName, NULL);
Thanks. Was assuming if one failed they'd both fail, but better not to make any assumptions.
Dan
/src/graphics.c line 2583:
pixGetDimensions(pixs, &w, &h, NULL); xstart = (l_int32 )LEPT_CALLOC(L_MAX(1, w / 2), sizeof(l_int32)); xend = (l_int32 )LEPT_CALLOC(L_MAX(1, w / 2), sizeof(l_int32)); if (!xstart) // <-- missing LEPT_FREE(xend); return (PIX *)ERROR_PTR("xstart and xend not made", procName, NULL);