fixed mismatched free/delete[] in AvatarDefs

This commit is contained in:
csoler 2017-06-24 11:38:48 +02:00
parent 2bb49f6925
commit 332feddb17

View File

@ -44,7 +44,7 @@ void AvatarDefs::getOwnAvatar(QPixmap &avatar, const QString& defaultImage)
/* load image */ /* load image */
avatar.loadFromData(data, size, "PNG") ; avatar.loadFromData(data, size, "PNG") ;
delete[] data; free(data);
} }
void AvatarDefs::getAvatarFromSslId(const RsPeerId& sslId, QPixmap &avatar, const QString& defaultImage) void AvatarDefs::getAvatarFromSslId(const RsPeerId& sslId, QPixmap &avatar, const QString& defaultImage)
{ {
@ -61,7 +61,7 @@ void AvatarDefs::getAvatarFromSslId(const RsPeerId& sslId, QPixmap &avatar, cons
/* load image */ /* load image */
avatar.loadFromData(data, size, "PNG") ; avatar.loadFromData(data, size, "PNG") ;
delete[] data; free(data);
} }
void AvatarDefs::getAvatarFromGxsId(const RsGxsId& gxsId, QPixmap &avatar, const QString& defaultImage) void AvatarDefs::getAvatarFromGxsId(const RsGxsId& gxsId, QPixmap &avatar, const QString& defaultImage)
{ {
@ -112,5 +112,5 @@ void AvatarDefs::getAvatarFromGpgId(const RsPgpId& gpgId, QPixmap &avatar, const
/* load image */ /* load image */
avatar.loadFromData(data, size, "PNG") ; avatar.loadFromData(data, size, "PNG") ;
delete[] data; free(data);
} }