Fix memory leak in sqlexec()
Callers are supposed to free the error strings themselves: https://www.sqlite.org/capi3ref.html#sqlite3_exec Found by Coverity.
This commit is contained in:
parent
b79bc6872d
commit
d8dc4fd37b
|
@ -233,6 +233,7 @@ static int sqlexec(sqlite3 *sdb, const char *fmt, ...)
|
|||
rpmlog(RPMLOG_DEBUG, "%s: %d\n", cmd, rc);
|
||||
|
||||
sqlite3_free(cmd);
|
||||
sqlite3_free(err);
|
||||
|
||||
return rc ? RPMRC_FAIL : RPMRC_OK;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue