Commit e2e90597 authored by Martin Tobias Holmedahl Sandsmark's avatar Martin Tobias Holmedahl Sandsmark
Browse files

Fix memory leak in CMS

Quoting iccjpeg.h:
  * IMPORTANT: the data at **icc_data_ptr has been allocated with malloc()
  * and must be freed by the caller with free() when the caller no longer
  * needs it.  (Alternatively, we could write this routine to use the
  * IJG library's memory allocator, so that the data would be freed implicitly
  * at jpeg_finish_decompress() time.  But it seems likely that many apps
  * will prefer to have the data stick around after decompression finishes.)

Reviewed By: ngraham

Differential Revision: https://phabricator.kde.org/D28344
parent 6cc5a511
......@@ -98,6 +98,7 @@ static cmsHPROFILE loadFromJpegData(const QByteArray& data)
}
jpeg_destroy_decompress(&srcinfo);
free(profile_data);
return profile;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment