netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* potential null dereference in proto_register()
@ 2009-06-02  8:50 Dan Carpenter
  2009-06-02  9:54 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2009-06-02  8:50 UTC (permalink / raw)
  To: netdev

There is a potential null dereference in proto_register() 
from net/core/sock.c

prot->rsk_prot can be null on line 2161 but we dereference it on line 
2167.

  2161  out_free_request_sock_slab:
  2162          if (prot->rsk_prot && prot->rsk_prot->slab) {
  2163                  kmem_cache_destroy(prot->rsk_prot->slab);
  2164                  prot->rsk_prot->slab = NULL;
  2165          }
  2166  out_free_request_sock_slab_name:
  2167          kfree(prot->rsk_prot->slab_name);

Found by smatch.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-06-03 11:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-02  8:50 potential null dereference in proto_register() Dan Carpenter
2009-06-02  9:54 ` David Miller
2009-06-03 11:47   ` Jarek Poplawski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).