loader: zfs_alloc and zfs_free should use panic
The zfs alloc and free code print out the error and get stuck in infinite loop; use panic() instead.
This commit is contained in:
parent
bec2d7e9a2
commit
51e5c6b89e
@ -107,8 +107,7 @@ zfs_alloc(size_t size)
|
|||||||
char *ptr;
|
char *ptr;
|
||||||
|
|
||||||
if (zfs_temp_ptr + size > zfs_temp_end) {
|
if (zfs_temp_ptr + size > zfs_temp_end) {
|
||||||
printf("ZFS: out of temporary buffer space\n");
|
panic("ZFS: out of temporary buffer space");
|
||||||
for (;;) ;
|
|
||||||
}
|
}
|
||||||
ptr = zfs_temp_ptr;
|
ptr = zfs_temp_ptr;
|
||||||
zfs_temp_ptr += size;
|
zfs_temp_ptr += size;
|
||||||
@ -122,8 +121,7 @@ zfs_free(void *ptr, size_t size)
|
|||||||
|
|
||||||
zfs_temp_ptr -= size;
|
zfs_temp_ptr -= size;
|
||||||
if (zfs_temp_ptr != ptr) {
|
if (zfs_temp_ptr != ptr) {
|
||||||
printf("ZFS: zfs_alloc()/zfs_free() mismatch\n");
|
panic("ZFS: zfs_alloc()/zfs_free() mismatch");
|
||||||
for (;;) ;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user