Skip to contentSkip to conversation

slab: kfree(null) is unlikely

PATCH Andrew Morton 2 participants 2 messages Mar 29, 2005 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 5 lines · Linux Kernel Mailing List

ChangeSet 1.2231.1.8, 2005/03/28 19:18:25-08:00, [email protected]

[PATCH] slab: kfree(null) is unlikely

- mark kfree(NULL) as being unlikely

This is just a wild guess, right?

Seems to me, it depends on the code.

Jeff

#2 lore raw
Quoted 9 lines · Jeff Garzik
Quoted 5 lines · Linux Kernel Mailing List

ChangeSet 1.2231.1.8, 2005/03/28 19:18:25-08:00, [email protected]

[PATCH] slab: kfree(null) is unlikely

- mark kfree(NULL) as being unlikely

This is just a wild guess, right?

More like a judgement based on experience?

Quoted 2 lines

Seems to me, it depends on the code.

If someone is doing kfree(0) with sufficient frequency for this patch to matter, then they need to stop doing that, rather than pessimising kfree(not 0).