slub: fix a possible memory leak
Subsystems (2)
PATCH 1/1 slub: fix a possible memory leak
Memory allocated by kstrdup should be freed,
when kmalloc(kmem_size, GFP_KERNEL) is failed.
mm/slub.c +1 -1
@@ -3968,9 +3968,9 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size, }return s; } -kfree (n);kfree (s); } +kfree (n); err:up_write (&slub_lock);
Signature · 8 lines
1.7.9.5 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 2 lines · Joonsoo Kim
Memory allocated by kstrdup should be freed,
whenkmalloc(kmem_size, GFP_KERNEL)is failed.
True.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 4 lines · Joonsoo Kim
Memory allocated by kstrdup should be freed,
whenkmalloc(kmem_size, GFP_KERNEL)is failed.Signed-off-by Joonsoo Kim <[email protected]>
kmem_cache_create() in slub would significantly be improved with a rewrite to have a clear error path and use of return values of functions it calls.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Pekka Enberg
AppliedQuoted 11 lines · David Rientjes
Quoted 4 lines · Joonsoo Kim
Memory allocated by kstrdup should be freed,
whenkmalloc(kmem_size, GFP_KERNEL)is failed.Signed-off-by Joonsoo Kim <[email protected]>Acked-by David Rientjes <[email protected]>
kmem_cache_create()in slub would significantly be improved with a rewrite to have a clear error path and use of return values of functions it calls.
Applied, thanks!
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>