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; kfree(NULL

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 > --- > fs/