- Memory leak from FontConfig Pattern pointer.
- Uninitialized local variable can be problem
when it checks address for free and file close.
Change-Id: I5a23fbf2fa484a70cceaab9eb6cbda5d86cb02f1
#define COPY_BUF_SIZE 16777216
static int copy_file(const char *srcpath, const char *destpath) {
- FILE *in, *out;
- char *buf;
+ FILE *in = NULL, *out = NULL;
+ char *buf = NULL;
size_t len;
if (!srcpath || !destpath)
fs = FcFontList(NULL, pat, os);
FcPatternDestroy(pat);
+ pat = NULL;
free(current_font_name);
+ current_font_name = NULL;
if (fs)
{
return do_uninstall(deletedir);
FAIL:
+ if (pat) FcPatternDestroy(pat);
elm_shutdown();
pkgmgrinfo_pkginfo_destroy_pkginfo(handle);