Fix memory leaks in test cases
We must not forget to call gdFontCacheShutdown() when we have used gdImageStringFT() and friends.master
parent
0bd7ec0560
commit
edd5cae622
|
@ -27,6 +27,7 @@ int main()
|
|||
gdTestAssertMsg(error == NULL, "%s", error);
|
||||
|
||||
gdImageDestroy(im);
|
||||
gdFontCacheShutdown();
|
||||
|
||||
return gdNumFailures();
|
||||
}
|
||||
|
|
|
@ -34,5 +34,6 @@ int main()
|
|||
}
|
||||
}
|
||||
gdImageDestroy(im);
|
||||
gdFontCacheShutdown();
|
||||
return error;
|
||||
}
|
||||
|
|
|
@ -73,6 +73,7 @@ int main()
|
|||
fclose(fp);
|
||||
done:
|
||||
gdImageDestroy(im);
|
||||
gdFontCacheShutdown();
|
||||
free(path);
|
||||
return error;
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ int main()
|
|||
return 2;
|
||||
}
|
||||
gdFree(strex.fontpath);
|
||||
gdFontCacheShutdown();
|
||||
free(path);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue