diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/dlm/user.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/dlm/user.c b/fs/dlm/user.c index 322a6bcd70a2..d18e7a539f11 100644 --- a/fs/dlm/user.c +++ b/fs/dlm/user.c @@ -357,6 +357,10 @@ static int dlm_device_register(struct dlm_ls *ls, char *name) error = misc_register(&ls->ls_device); if (error) { kfree(ls->ls_device.name); + /* this has to be set to NULL + * to avoid a double-free in dlm_device_deregister + */ + ls->ls_device.name = NULL; } fail: return error; |