Re: [PATCH] reiserfs: kstrdup() memory handling

2015-03-22 Thread Josh Triplett
On Sun, Mar 22, 2015 at 08:12:46PM -0400, Sanidhya Kashyap wrote: > On Sat, Mar 21, 2015 at 1:15 PM, Josh Triplett wrote: > > On Sat, Mar 21, 2015 at 01:00:13PM -0400, Sanidhya Kashyap wrote: > >> Checking for ENOMEM even for new_opts in reiserfs_remount function as > >> there is a possibility of

Re: [PATCH] reiserfs: kstrdup() memory handling

2015-03-22 Thread Sanidhya Kashyap
On Sat, Mar 21, 2015 at 1:15 PM, Josh Triplett wrote: > On Sat, Mar 21, 2015 at 01:00:13PM -0400, Sanidhya Kashyap wrote: >> Checking for ENOMEM even for new_opts in reiserfs_remount function as >> there is a possibility of nothing being allocated. > > You don't need to add a new label;

Re: [PATCH] reiserfs: kstrdup() memory handling

2015-03-22 Thread Sanidhya Kashyap
On Sat, Mar 21, 2015 at 1:15 PM, Josh Triplett j...@joshtriplett.org wrote: On Sat, Mar 21, 2015 at 01:00:13PM -0400, Sanidhya Kashyap wrote: Checking for ENOMEM even for new_opts in reiserfs_remount function as there is a possibility of nothing being allocated. You don't need to add a new

Re: [PATCH] reiserfs: kstrdup() memory handling

2015-03-22 Thread Josh Triplett
On Sun, Mar 22, 2015 at 08:12:46PM -0400, Sanidhya Kashyap wrote: On Sat, Mar 21, 2015 at 1:15 PM, Josh Triplett j...@joshtriplett.org wrote: On Sat, Mar 21, 2015 at 01:00:13PM -0400, Sanidhya Kashyap wrote: Checking for ENOMEM even for new_opts in reiserfs_remount function as there is a

Re: [PATCH] reiserfs: kstrdup() memory handling

2015-03-21 Thread Josh Triplett
On Sat, Mar 21, 2015 at 01:00:13PM -0400, Sanidhya Kashyap wrote: > Checking for ENOMEM even for new_opts in reiserfs_remount function as > there is a possibility of nothing being allocated. You don't need to add a new label; kfree(NULL) is a no-op. > Signed-off-by: Sanidhya Kashyap > --- >

[PATCH] reiserfs: kstrdup() memory handling

2015-03-21 Thread Sanidhya Kashyap
Checking for ENOMEM even for new_opts in reiserfs_remount function as there is a possibility of nothing being allocated. Signed-off-by: Sanidhya Kashyap --- fs/reiserfs/super.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index

[PATCH] reiserfs: kstrdup() memory handling

2015-03-21 Thread Sanidhya Kashyap
Checking for ENOMEM even for new_opts in reiserfs_remount function as there is a possibility of nothing being allocated. Signed-off-by: Sanidhya Kashyap sanidhya.gat...@gmail.com --- fs/reiserfs/super.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/fs/reiserfs/super.c

Re: [PATCH] reiserfs: kstrdup() memory handling

2015-03-21 Thread Josh Triplett
On Sat, Mar 21, 2015 at 01:00:13PM -0400, Sanidhya Kashyap wrote: Checking for ENOMEM even for new_opts in reiserfs_remount function as there is a possibility of nothing being allocated. You don't need to add a new label; kfree(NULL) is a no-op. Signed-off-by: Sanidhya Kashyap