Changeset View
Changeset View
Standalone View
Standalone View
sftp/kio_sftp.cpp
Show First 20 Lines • Show All 437 Lines • ▼ Show 20 Line(s) | 430 | QString sftpProtocol::canonicalizePath(const QString &path) { | |||
---|---|---|---|---|---|
438 | 438 | | |||
439 | sPath = sftp_canonicalize_path(mSftp, path.toUtf8().constData()); | 439 | sPath = sftp_canonicalize_path(mSftp, path.toUtf8().constData()); | ||
440 | if (sPath == nullptr) { | 440 | if (sPath == nullptr) { | ||
441 | qCDebug(KIO_SFTP_LOG) << "Could not canonicalize path: " << path; | 441 | qCDebug(KIO_SFTP_LOG) << "Could not canonicalize path: " << path; | ||
442 | return cPath; | 442 | return cPath; | ||
443 | } | 443 | } | ||
444 | 444 | | |||
445 | cPath = QFile::decodeName(sPath); | 445 | cPath = QFile::decodeName(sPath); | ||
446 | delete sPath; | 446 | free(sPath); | ||
aacid: Use ssh_string_free_char ? | |||||
+1 "The caller needs to free the memory using ssh_string_free_char()." http://api.libssh.org/stable/group__libssh__sftp.html#gab4860a441da019060f78c8d236d9ec91 sitter: +1
"The caller needs to free the memory using ssh_string_free_char()."
http://api.libssh. | |||||
447 | 447 | | |||
448 | qCDebug(KIO_SFTP_LOG) << "Canonicalized path: " << cPath; | 448 | qCDebug(KIO_SFTP_LOG) << "Canonicalized path: " << cPath; | ||
449 | 449 | | |||
450 | return cPath; | 450 | return cPath; | ||
451 | } | 451 | } | ||
452 | 452 | | |||
453 | sftpProtocol::sftpProtocol(const QByteArray &pool_socket, const QByteArray &app_socket) | 453 | sftpProtocol::sftpProtocol(const QByteArray &pool_socket, const QByteArray &app_socket) | ||
454 | : SlaveBase("kio_sftp", pool_socket, app_socket), | 454 | : SlaveBase("kio_sftp", pool_socket, app_socket), | ||
▲ Show 20 Lines • Show All 2185 Lines • Show Last 20 Lines |
Use ssh_string_free_char ?