Fix mismatched free() new.

This commit is contained in:
Black Hat 2018-07-17 20:41:43 +08:00
parent c10c3b1d1d
commit 1ce327140e
1 changed files with 1 additions and 1 deletions

View File

@ -105,6 +105,6 @@ void Controller::postFile(QMatrixClient::Room* room, const QUrl& localFile,
QString Controller::getMIME(const QUrl& fileUrl) const {
QMimeDatabase* db = new QMimeDatabase();
const QString mime = db->mimeTypeForFile(fileUrl.toLocalFile()).name();
free(db);
delete db;
return mime;
}