Signed-off-by: Pierre Habouzit <madcoder@xxxxxxxxxx> --- While we're at it... Here is a stupid memory leak in apply_filter. On top of the previous commit. convert.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/convert.c b/convert.c index 4664197..d5c197f 100644 --- a/convert.c +++ b/convert.c @@ -293,10 +293,9 @@ static int apply_filter(const char *path, const char *src, size_t len, } if (ret) { - *dst = nbuf; - } else { - strbuf_release(&nbuf); + strbuf_swap(dst, &nbuf); } + strbuf_release(&nbuf); return ret; } -- 1.5.3.4.208.gdcc67-dirty
Attachment:
pgpT2dA8VTkiA.pgp
Description: PGP signature