Re: [PATCH 2/4] cifs: cleanup asn1.c - kfree
On Fri, 8 Apr 2005, Adrian Bunk wrote: > On Mon, Apr 04, 2005 at 11:01:45PM +0200, Jesper Juhl wrote: > > Remove redundant NULL pointer check before calling kfree(). > > > > Signed-off-by: Jesper Juhl <[EMAIL PROTECTED]> > > > > > > --- linux-2.6.12-rc1-mm4/fs/cifs/asn1.c.with_patch1 2005-04-04 > > 22:25:50.0 +0200 > > +++ linux-2.6.12-rc1-mm4/fs/cifs/asn1.c 2005-04-04 22:33:34.0 > > +0200 > > @@ -540,7 +540,6 @@ int decode_negTokenInit(unsigned char *s > >*(oid + 3))); > > rc = compare_oid(oid, oidlen, > > NTLMSSP_OID, > > NTLMSSP_OID_LEN); > > - if(oid) > > kfree(oid); > > if (rc) > > use_ntlmssp = TRUE; > > > Please fix the indentation of the kfree after removing the if. > I do, in the next patch in the series, the "fs_cifs_asn1-spacing-and-long-lines.patch" patch. That one fixes the indentation along with lots of other whitespace issues. -- Jesper Juhl - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2/4] cifs: cleanup asn1.c - kfree
On Fri, 8 Apr 2005, Adrian Bunk wrote: On Mon, Apr 04, 2005 at 11:01:45PM +0200, Jesper Juhl wrote: Remove redundant NULL pointer check before calling kfree(). Signed-off-by: Jesper Juhl [EMAIL PROTECTED] --- linux-2.6.12-rc1-mm4/fs/cifs/asn1.c.with_patch1 2005-04-04 22:25:50.0 +0200 +++ linux-2.6.12-rc1-mm4/fs/cifs/asn1.c 2005-04-04 22:33:34.0 +0200 @@ -540,7 +540,6 @@ int decode_negTokenInit(unsigned char *s *(oid + 3))); rc = compare_oid(oid, oidlen, NTLMSSP_OID, NTLMSSP_OID_LEN); - if(oid) kfree(oid); if (rc) use_ntlmssp = TRUE; Please fix the indentation of the kfree after removing the if. I do, in the next patch in the series, the fs_cifs_asn1-spacing-and-long-lines.patch patch. That one fixes the indentation along with lots of other whitespace issues. -- Jesper Juhl - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2/4] cifs: cleanup asn1.c - kfree
On Mon, Apr 04, 2005 at 11:01:45PM +0200, Jesper Juhl wrote: > Remove redundant NULL pointer check before calling kfree(). > > Signed-off-by: Jesper Juhl <[EMAIL PROTECTED]> > > > --- linux-2.6.12-rc1-mm4/fs/cifs/asn1.c.with_patch1 2005-04-04 > 22:25:50.0 +0200 > +++ linux-2.6.12-rc1-mm4/fs/cifs/asn1.c 2005-04-04 22:33:34.0 > +0200 > @@ -540,7 +540,6 @@ int decode_negTokenInit(unsigned char *s > *(oid + 3))); > rc = compare_oid(oid, oidlen, > NTLMSSP_OID, >NTLMSSP_OID_LEN); > - if(oid) > kfree(oid); > if (rc) > use_ntlmssp = TRUE; Please fix the indentation of the kfree after removing the if. cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2/4] cifs: cleanup asn1.c - kfree
On Mon, Apr 04, 2005 at 11:01:45PM +0200, Jesper Juhl wrote: Remove redundant NULL pointer check before calling kfree(). Signed-off-by: Jesper Juhl [EMAIL PROTECTED] --- linux-2.6.12-rc1-mm4/fs/cifs/asn1.c.with_patch1 2005-04-04 22:25:50.0 +0200 +++ linux-2.6.12-rc1-mm4/fs/cifs/asn1.c 2005-04-04 22:33:34.0 +0200 @@ -540,7 +540,6 @@ int decode_negTokenInit(unsigned char *s *(oid + 3))); rc = compare_oid(oid, oidlen, NTLMSSP_OID, NTLMSSP_OID_LEN); - if(oid) kfree(oid); if (rc) use_ntlmssp = TRUE; Please fix the indentation of the kfree after removing the if. cu Adrian -- Is there not promise of rain? Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. Only a promise, Lao Er said. Pearl S. Buck - Dragon Seed - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2/4] cifs: cleanup asn1.c - kfree
Remove redundant NULL pointer check before calling kfree(). Signed-off-by: Jesper Juhl <[EMAIL PROTECTED]> --- linux-2.6.12-rc1-mm4/fs/cifs/asn1.c.with_patch1 2005-04-04 22:25:50.0 +0200 +++ linux-2.6.12-rc1-mm4/fs/cifs/asn1.c 2005-04-04 22:33:34.0 +0200 @@ -540,7 +540,6 @@ int decode_negTokenInit(unsigned char *s *(oid + 3))); rc = compare_oid(oid, oidlen, NTLMSSP_OID, NTLMSSP_OID_LEN); - if(oid) kfree(oid); if (rc) use_ntlmssp = TRUE; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2/4] cifs: cleanup asn1.c - kfree
Remove redundant NULL pointer check before calling kfree(). Signed-off-by: Jesper Juhl [EMAIL PROTECTED] --- linux-2.6.12-rc1-mm4/fs/cifs/asn1.c.with_patch1 2005-04-04 22:25:50.0 +0200 +++ linux-2.6.12-rc1-mm4/fs/cifs/asn1.c 2005-04-04 22:33:34.0 +0200 @@ -540,7 +540,6 @@ int decode_negTokenInit(unsigned char *s *(oid + 3))); rc = compare_oid(oid, oidlen, NTLMSSP_OID, NTLMSSP_OID_LEN); - if(oid) kfree(oid); if (rc) use_ntlmssp = TRUE; - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/