Change-Id: I6bb82e9293308da17217a67c98c49d8682ba9658
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
if (!md) {
_E("malloc failed");
+ sqlite3_finalize(stmt);
return RESOURCED_ERROR_OUT_OF_MEMORY;
}
if (snprintf(md->appid, MAX_APPID_LENGTH, "%s", table->appid) < 0) {
_E("snprintf failed");
free(md);
+ sqlite3_finalize(stmt);
return RESOURCED_ERROR_OUT_OF_MEMORY;
}
if (snprintf(md->pkgid, MAX_PKGNAME_LENGTH, "%s", table->pkgid) < 0) {
_E("asprintf failed");
free(md);
+ sqlite3_finalize(stmt);
return RESOURCED_ERROR_OUT_OF_MEMORY;
}