Skip to content

Commit 4751b60

Browse files
uraniumvapier
authored andcommitted
gdImageScaleTwoPass memory leak fix
Fixing memory leak in gdImageScaleTwoPass, as reported by @cmb69 and confirmed by @vapier. This bug actually bit me in production and I'm very thankful that it was reported with an easy fix. Fixes #173.
1 parent 4e1ce66 commit 4751b60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/gd_interpolation.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1087,7 +1087,7 @@ gdImageScaleTwoPass(const gdImagePtr src, const unsigned int new_width,
10871087
}/* if */
10881088

10891089
if (src != tmp_im) {
1090-
gdFree(tmp_im);
1090+
gdImageDestroy(tmp_im);
10911091
}/* if */
10921092

10931093
return dst;

0 commit comments

Comments
 (0)