Skip to content
Commit 851a8a7f authored by Jesper Juhl's avatar Jesper Juhl Committed by Linus Torvalds
Browse files

dm: fix memory leak in dm_create_persistent() when starting metadata update thread fails



If, in dm_create_persistent(), the call to create_singlethread_workqueue()
fails then we'll return without freeing the memory allocated to 'ps', thus
leaking sizeof(struct pstore) bytes.  This patch fixes the leak.

Signed-off-by: default avatarJesper Juhl <jesper.juhl@gmail.com>
Acked-by: default avatarAlasdair G Kergon <agk@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent cb32da04
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment