mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-19 03:31:26 +00:00
scst_event: fix forgotten corner case module_put
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6723 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -866,7 +866,7 @@ static int scst_event_create_priv(struct file *file)
|
||||
PRINT_ERROR("Unable to allocate priv (size %zd)",
|
||||
sizeof(*priv));
|
||||
res = -ENOMEM;
|
||||
goto out;
|
||||
goto out_put;
|
||||
}
|
||||
|
||||
TRACE_MEM("priv %p allocated", priv);
|
||||
@@ -891,6 +891,10 @@ static int scst_event_create_priv(struct file *file)
|
||||
out:
|
||||
TRACE_EXIT_RES(res);
|
||||
return res;
|
||||
|
||||
out_put:
|
||||
module_put(THIS_MODULE);
|
||||
goto out;
|
||||
}
|
||||
|
||||
static long scst_event_ioctl(struct file *file, unsigned int cmd,
|
||||
|
||||
Reference in New Issue
Block a user