* Fix a few spots where we were checking for NULL unneededly
* Fix a few spots where we *should* of been checking for NULL to prevent referencing a null pointer. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42505 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
13e2521356
commit
a956672a33
@ -168,22 +168,24 @@ init_common(int device, bool isClone)
|
||||
static void
|
||||
uninit_common(void)
|
||||
{
|
||||
delete_area(gInfo->regs_area);
|
||||
delete_area(gInfo->shared_info_area);
|
||||
if (gInfo != NULL) {
|
||||
delete_area(gInfo->regs_area);
|
||||
delete_area(gInfo->shared_info_area);
|
||||
|
||||
gInfo->regs_area = gInfo->shared_info_area = -1;
|
||||
gInfo->regs_area = gInfo->shared_info_area = -1;
|
||||
|
||||
// close the file handle ONLY if we're the clone
|
||||
if (gInfo->is_clone)
|
||||
close(gInfo->device);
|
||||
// close the file handle ONLY if we're the clone
|
||||
if (gInfo->is_clone)
|
||||
close(gInfo->device);
|
||||
|
||||
free(gInfo);
|
||||
free(gInfo);
|
||||
}
|
||||
|
||||
for (uint32 id = 0; id < MAX_DISPLAY; id++) {
|
||||
if (gDisplay[id]->regs != NULL)
|
||||
if (gDisplay[id] != NULL) {
|
||||
free(gDisplay[id]->regs);
|
||||
if (gDisplay[id] != NULL)
|
||||
free(gDisplay[id]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user