avoid potential null pointer (from forys@boulder.colorado.edu)
authorSam Leffler <sam@ucbvax.Berkeley.EDU>
Sat, 9 May 1987 01:51:43 +0000 (17:51 -0800)
committerSam Leffler <sam@ucbvax.Berkeley.EDU>
Sat, 9 May 1987 01:51:43 +0000 (17:51 -0800)
bug report 4.3BSD/sys/117

SCCS-vsn: sys/netinet/tcp_usrreq.c 7.5

usr/src/sys/netinet/tcp_usrreq.c

index 6c08d57..e43f35b 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)tcp_usrreq.c        7.4 (Berkeley) %G%
+ *     @(#)tcp_usrreq.c        7.5 (Berkeley) %G%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -343,7 +343,8 @@ tcp_ctloutput(op, so, level, optname, mp)
                        error = EINVAL;
                        break;
                }
                        error = EINVAL;
                        break;
                }
-               (void)m_free(m);
+               if (m)
+                       (void) m_free(m);
                break;
 
        case PRCO_GETOPT:
                break;
 
        case PRCO_GETOPT: