PVS V774: use after free
Change-Id: I96267456623389e66f003bef94246c7d58a2c23d Reviewed-on: https://review.haiku-os.org/c/1626 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
parent
a216132469
commit
1602e35c4c
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user