File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -216,7 +216,8 @@ static long bch2_ioctl_fsck_offline(struct bch_ioctl_fsck_offline __user *user_a
216216
217217 ret = PTR_ERR_OR_ZERO (optstr ) ?:
218218 bch2_parse_mount_opts (NULL , & thr -> opts , optstr );
219- kfree (optstr );
219+ if (!IS_ERR (optstr ))
220+ kfree (optstr );
220221
221222 if (ret )
222223 goto err ;
@@ -319,7 +320,8 @@ static long bch2_ioctl_disk_add(struct bch_fs *c, struct bch_ioctl_disk arg)
319320 return ret ;
320321
321322 ret = bch2_dev_add (c , path );
322- kfree (path );
323+ if (!IS_ERR (path ))
324+ kfree (path );
323325
324326 return ret ;
325327}
@@ -850,7 +852,8 @@ static long bch2_ioctl_fsck_online(struct bch_fs *c,
850852
851853 ret = PTR_ERR_OR_ZERO (optstr ) ?:
852854 bch2_parse_mount_opts (c , & thr -> opts , optstr );
853- kfree (optstr );
855+ if (!IS_ERR (optstr ))
856+ kfree (optstr );
854857
855858 if (ret )
856859 goto err ;
You can’t perform that action at this time.
0 commit comments