ICNSTranslator: Fix memory leak
This commit is contained in:
@@ -223,6 +223,7 @@ ICNSSaver::ICNSSaver(BPositionIO *stream, uint32 rowBytes, icns_type_t type)
|
|||||||
icns_type_t iconType = icns_get_type_from_image_info(iconInfo);
|
icns_type_t iconType = icns_get_type_from_image_info(iconInfo);
|
||||||
|
|
||||||
if (iconType == ICNS_NULL_TYPE) {
|
if (iconType == ICNS_NULL_TYPE) {
|
||||||
|
delete bits;
|
||||||
free(fIconFamily);
|
free(fIconFamily);
|
||||||
fIconFamily = NULL;
|
fIconFamily = NULL;
|
||||||
return;
|
return;
|
||||||
@@ -278,6 +279,8 @@ ICNSSaver::ICNSSaver(BPositionIO *stream, uint32 rowBytes, icns_type_t type)
|
|||||||
free(fIconFamily);
|
free(fIconFamily);
|
||||||
fIconFamily = NULL;
|
fIconFamily = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delete bits;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user