X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=xdiff-interface.c;h=08602f522183dc43787616f37cba9b8af4e3dade;hb=cb849b46ac68feea716a45fd1de99cfdd71123d0;hp=6a82da73b6d3b6b8cca23c3183cddc36c5cafb4b;hpb=1a17ee22a2fbd85a893ab36fd53168d03554c2dd;p=git.git diff --git a/xdiff-interface.c b/xdiff-interface.c index 6a82da73b..08602f522 100644 --- a/xdiff-interface.c +++ b/xdiff-interface.c @@ -69,9 +69,9 @@ int xdiff_outf(void *priv_, mmbuffer_t *mb, int nbuf) for (i = 0; i < nbuf; i++) { if (mb[i].ptr[mb[i].size-1] != '\n') { /* Incomplete line */ - priv->remainder = realloc(priv->remainder, - priv->remainder_size + - mb[i].size); + priv->remainder = xrealloc(priv->remainder, + priv->remainder_size + + mb[i].size); memcpy(priv->remainder + priv->remainder_size, mb[i].ptr, mb[i].size); priv->remainder_size += mb[i].size; @@ -83,9 +83,9 @@ int xdiff_outf(void *priv_, mmbuffer_t *mb, int nbuf) consume_one(priv, mb[i].ptr, mb[i].size); continue; } - priv->remainder = realloc(priv->remainder, - priv->remainder_size + - mb[i].size); + priv->remainder = xrealloc(priv->remainder, + priv->remainder_size + + mb[i].size); memcpy(priv->remainder + priv->remainder_size, mb[i].ptr, mb[i].size); consume_one(priv, priv->remainder,