Mercurial > hg > dmlib
comparison tools/lib64gfx.c @ 1510:7bbf4b41fc33
Urgh. 1000L idiotic mistake: a dmGrowBufAlloc() call had been left in
dmEncodeGenericRLE(), causing a memory leak.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 11 May 2018 22:24:11 +0300 |
parents | 7d012e5acf5c |
children | 62ede0de6ab0 |
comparison
equal
deleted
inserted
replaced
1509:15afe578f0ae | 1510:7bbf4b41fc33 |
---|---|
249 | 249 |
250 | 250 |
251 int dmDecodeGenericRLE(DMGrowBuf *dst, const Uint8 *src, const Uint8 *srcEnd, const DMCompParams *cfg) | 251 int dmDecodeGenericRLE(DMGrowBuf *dst, const Uint8 *src, const Uint8 *srcEnd, const DMCompParams *cfg) |
252 { | 252 { |
253 int res; | 253 int res; |
254 | |
255 if ((res = dmGrowBufAlloc(dst, BUF_SIZE_INITIAL, BUF_SIZE_GROW)) != DMERR_OK) | |
256 goto err; | |
257 | 254 |
258 // Perform RLE decode | 255 // Perform RLE decode |
259 while (src < srcEnd) | 256 while (src < srcEnd) |
260 { | 257 { |
261 Uint8 data = *src++; | 258 Uint8 data = *src++; |