diff --git a/src/add-ons/kernel/file_systems/ntfs/utils/mkntfs.c b/src/add-ons/kernel/file_systems/ntfs/utils/mkntfs.c index 3b9ed362fa..dc32faf1e6 100644 --- a/src/add-ons/kernel/file_systems/ntfs/utils/mkntfs.c +++ b/src/add-ons/kernel/file_systems/ntfs/utils/mkntfs.c @@ -4287,10 +4287,10 @@ static BOOL mkntfs_create_root_structures(void) 1); if ((u32)(1 << -bs->clusters_per_mft_record) != g_vol->mft_record_size) { - free(bs); ntfs_log_error("BUG: calculated clusters_per_mft_record" " is wrong (= 0x%x)\n", bs->clusters_per_mft_record); + free(bs); return FALSE; } } @@ -4304,11 +4304,11 @@ static BOOL mkntfs_create_root_structures(void) bs->clusters_per_index_record = -g_vol->indx_record_size_bits; if ((1 << -bs->clusters_per_index_record) != (s32)g_vol->indx_record_size) { - free(bs); ntfs_log_error("BUG: calculated " "clusters_per_index_record is wrong " "(= 0x%x)\n", bs->clusters_per_index_record); + free(bs); return FALSE; } } diff --git a/src/apps/remotedesktop/RemoteView.cpp b/src/apps/remotedesktop/RemoteView.cpp index 595a7f2da0..74e269bc0e 100644 --- a/src/apps/remotedesktop/RemoteView.cpp +++ b/src/apps/remotedesktop/RemoteView.cpp @@ -1256,7 +1256,6 @@ RemoteView::_DrawThread() offscreen->DrawString(string, offsets, count); - free(string); reply.Start(RP_DRAW_STRING_RESULT); reply.Add(token); reply.Add(offscreen->PenLocation()); @@ -1268,6 +1267,7 @@ RemoteView::_DrawThread() BRect boxes[count]; font.GetBoundingBoxesAsGlyphs(string, count, B_SCREEN_METRIC, boxes); + free(string); font_height height; offscreen->GetFontHeight(&height);