File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ int ubifs_add_orphan(struct ubifs_info *c, ino_t inum)
157
157
int err = 0 ;
158
158
ino_t xattr_inum ;
159
159
union ubifs_key key ;
160
- struct ubifs_dent_node * xent ;
160
+ struct ubifs_dent_node * xent , * pxent = NULL ;
161
161
struct fscrypt_name nm = {0 };
162
162
struct ubifs_orphan * xattr_orphan ;
163
163
struct ubifs_orphan * orphan ;
@@ -181,11 +181,16 @@ int ubifs_add_orphan(struct ubifs_info *c, ino_t inum)
181
181
xattr_inum = le64_to_cpu (xent -> inum );
182
182
183
183
xattr_orphan = orphan_add (c , xattr_inum , orphan );
184
- if (IS_ERR (xattr_orphan ))
184
+ if (IS_ERR (xattr_orphan )) {
185
+ kfree (xent );
185
186
return PTR_ERR (xattr_orphan );
187
+ }
186
188
189
+ kfree (pxent );
190
+ pxent = xent ;
187
191
key_read (c , & xent -> key , & key );
188
192
}
193
+ kfree (pxent );
189
194
190
195
return 0 ;
191
196
}
You can’t perform that action at this time.
0 commit comments