Re: [bug report] net/sctp: convert sctp_getsockopt_peeloff_common() to FD_PREPARE()

Dan Carpenter <[email protected]>
Newsgroups org.kernel.vger.linux-sctp
Message-ID <[email protected]>
Similar warning in sock_map_fd()

net/socket.c:510 sock_map_fd() warn: passing freed memory 'sock' (line 508)

net/socket.c
   504  static int sock_map_fd(struct socket *sock, int flags)
   505  {
   506          int fd;
   507  
   508          fd = FD_ADD(flags, sock_alloc_file(sock, flags, NULL));
                                                   ^^^^
Freed on error.

   509          if (fd < 0)
   510                  sock_release(sock);
                        ^^^^^^^^^^^^^^^^^^
double freed.

   511          return fd;
   512  }

regards,
dan carpenter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.