gutils: avoid a use-after-free in GImageReadRas()

Using free() here is incorrect and leads to a use-after-free code
path; route to the destroying path instead with an appropriate
error message.

CR-fixed: 1082478
pfa: avoid a NULL ptr dereference in _ReadPSFont()

CR-fixed: 1082477
gdraw: avoid a use-after-free in GImageResize()

rev does not get assigned to on every loop turn. So don't free it
inside the loop.

CR-fixed: 1082476
mbinary: avoid a double-free in SearchPostScriptResources()

_ReadPSFont() is probably weird but it fcloses the file passed as
parameter if the function fails. Fix the logic accordingly.

CR-fixed: 1082479
parsettf: avoid multiple frees in readttfbase()

Free bs in the scope in which it was created, otherwise freeing it
on every loop runs can get pretty toxic – note that proper indent
should help avoid this kind of errors.

CR-fixed: 1082481
effects: fix a double-free in MidLineCompetes()

ClipLineTo3D() frees the spline unless it returns false. Free only
in that case.
splineutil: avoid a use-after-free in AnchorPointsRemoveName()

Move the freeing instruction at the end of the loop branch so that
it does not read on a freed ptr.

CR-fixed: 1082487
autowidth: cleanup erroneous free() in AW_ReadKernPairFile()

filename was already freed above.
charinfo: fix read-after-free in GV_GetConstructedImage()

Free me after last access to it.
Merge pull request #1513 from adrientetar/buffer

Fix some double-frees/use-after-free