[cairo] [PATCH v2 2/2] test: Fix issues reported by cppcheck static analysis tool
nravi.n at samsung.com
Thu Aug 21 23:15:34 PDT 2014
> -----Original Message-----
> From: cairo [mailto:cairo-bounces at cairographics.org] On Behalf Of Bertram
> Sent: Friday, August 22, 2014 10:58 AM
> To: cairo at cairographics.org
> Subject: Re: [cairo] [PATCH v2 2/2] test: Fix issues reported by cppcheck
> static analysis tool
> RAVI NANJUNDAPPA wrote:
> > Hello Bertram,
> > If you look at the pdf-mime-data.c file, 'free(data)' is handled by
> > the callee at line numbers (from original file): 108, 153 and 159.
> Sorry, I had not looked at the callers. It's just unusual that for a
> function call to leave such cleanup to its callers. Is there any reason
> so in this case?
Sure. Not a problem.
But am not sure of why in this it is written like this, because usually
callee knows whether it has allocated the memory to data or not.
As of now, just for retaining the history, I haven't modified it. I hope
that should be fine.
Thanks and Best Regards,
> cairo mailing list
> cairo at cairographics.org
More information about the cairo