Fix memory leaks in test cases

We must not forget to call gdFontCacheShutdown() when we have used
gdImageStringFT() and friends.
master
Christoph M. Becker 2016-08-27 16:41:29 +02:00
parent 0bd7ec0560
commit edd5cae622
4 changed files with 4 additions and 0 deletions

View File

@ -27,6 +27,7 @@ int main()
gdTestAssertMsg(error == NULL, "%s", error);
gdImageDestroy(im);
gdFontCacheShutdown();
return gdNumFailures();
}

View File

@ -34,5 +34,6 @@ int main()
}
}
gdImageDestroy(im);
gdFontCacheShutdown();
return error;
}

View File

@ -73,6 +73,7 @@ int main()
fclose(fp);
done:
gdImageDestroy(im);
gdFontCacheShutdown();
free(path);
return error;
}

View File

@ -18,6 +18,7 @@ int main()
return 2;
}
gdFree(strex.fontpath);
gdFontCacheShutdown();
free(path);
return 0;
}