diff options
| -rw-r--r-- | ipc/util.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/ipc/util.c b/ipc/util.c index 7afe7def52cf..cecb46e89ab0 100644 --- a/ipc/util.c +++ b/ipc/util.c | |||
| @@ -911,8 +911,10 @@ static int sysvipc_proc_open(struct inode *inode, struct file *file) | |||
| 911 | goto out; | 911 | goto out; |
| 912 | 912 | ||
| 913 | ret = seq_open(file, &sysvipc_proc_seqops); | 913 | ret = seq_open(file, &sysvipc_proc_seqops); |
| 914 | if (ret) | 914 | if (ret) { |
| 915 | goto out_kfree; | 915 | kfree(iter); |
| 916 | goto out; | ||
| 917 | } | ||
| 916 | 918 | ||
| 917 | seq = file->private_data; | 919 | seq = file->private_data; |
| 918 | seq->private = iter; | 920 | seq->private = iter; |
| @@ -921,9 +923,6 @@ static int sysvipc_proc_open(struct inode *inode, struct file *file) | |||
| 921 | iter->ns = get_ipc_ns(current->nsproxy->ipc_ns); | 923 | iter->ns = get_ipc_ns(current->nsproxy->ipc_ns); |
| 922 | out: | 924 | out: |
| 923 | return ret; | 925 | return ret; |
| 924 | out_kfree: | ||
| 925 | kfree(iter); | ||
| 926 | goto out; | ||
| 927 | } | 926 | } |
| 928 | 927 | ||
| 929 | static int sysvipc_proc_release(struct inode *inode, struct file *file) | 928 | static int sysvipc_proc_release(struct inode *inode, struct file *file) |
