Skip to contentSkip to conversation

Bug - Re: memleak 'DeLuxe' detector, 2.0.32, patch

DISCUSSION MOLNAR Ingo 1 participant 1 message Dec 9, 1997 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 1 line · Randy Dees

Thanks - but it won't compile for me.

ok, the problem is that kfree() is now a macro, and the NCR driver tries to take it's address ...

this little patch should help:

53c7,8xx.c renamed from 53c7,8xx.c.orig +6 -1
@@ -3396,6 +3396,11 @@
     NCR53c7x0_write8(STEST3_REG_800, STEST3_800_TE);
 }
 
+static void private_kfree (void * addr)
+{
+	kfree(addr);
+}
+
 /*
  * Function static struct NCR53c7x0_cmd *allocate_cmd (Scsi_Cmnd *cmd)
  * 
@@ -3467,7 +3472,7 @@
 #ifdef LINUX_1_2
 	tmp->free = ((void (*)(void *, int)) kfree_s);
 #else
-	tmp->free = ((void (*)(void *, int)) kfree);
+	tmp->free = ((void (*)(void *, int)) private_kfree);
 #endif
 	save_flags (flags);
 	cli();