| To: | <lkcd@xxxxxxxxxxx> |
|---|---|
| Subject: | Patch to prevent double free in lcrash |
| From: | "Monty Vanderbilt" <mvb@xxxxxxxxxx> |
| Date: | Thu, 4 Oct 2001 12:52:10 -0700 |
| Importance: | Normal |
| Sender: | owner-lkcd@xxxxxxxxxxx |
This patch prevents a segment violation from a double free when lcrash can't
read data from /dev/mem.
--- libklib/kl_util.c Wed Sep 12 12:21:21 2001
+++ libklib/kl_util.c Tue Oct 2 12:54:10 2001
@@ -466,8 +466,9 @@
&size, ptr_module)){
kl_free_block(dump_page);
if(free_ptr_module){
kl_free_block(*ptr_module);
+ *ptr_module = 0;
}
return(1);
}
*vaddr= addr_mod;
@@ -484,8 +485,9 @@
&size, ptr_module)){
kl_free_block(dump_page);
if(free_ptr_module){
kl_free_block(*ptr_module);
+ *ptr_module = 0;
}
return(1);
}
mod_found = 1;
@@ -495,8 +497,9 @@
kl_free_block(dump_page);
if(!mod_found){
if(free_ptr_module){
kl_free_block(*ptr_module);
+ *ptr_module = 0;
}
return(1);
}
return(0);
@@ -534,8 +537,9 @@
GET_BLOCK(vaddr, *size, *ptr);
if (KL_ERROR) {
if(free_ptr){
kl_free_block(*ptr);
+ *ptr = 0;
}
return(1);
}
} else {
Monty VanderBilt
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH] fix for incomplete backtrace due to wrong esp value + some cleanups, Bharata B Rao |
|---|---|
| Next by Date: | Re: Patch to prevent double free in lcrash, Michael Holzheu |
| Previous by Thread: | trying to configure LKCD need help, Kim Le |
| Next by Thread: | Re: Patch to prevent double free in lcrash, Michael Holzheu |
| Indexes: | [Date] [Thread] [Top] [All Lists] |