6941311 t_sndv(3NSL) does free() of uninitialized pointer
authorRaja Andra <Rajagopal.Andra@Sun.COM>
Tue, 08 Jun 2010 15:31:17 -0700
changeset 12590 bfdd79a6d888
parent 12589 08d831116e35
child 12591 cdf3cc28b713
6941311 t_sndv(3NSL) does free() of uninitialized pointer
usr/src/lib/libnsl/nsl/t_sndv.c
--- a/usr/src/lib/libnsl/nsl/t_sndv.c	Tue Jun 08 15:59:50 2010 -0600
+++ b/usr/src/lib/libnsl/nsl/t_sndv.c	Tue Jun 08 15:31:17 2010 -0700
@@ -2,9 +2,8 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
  *
  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  * or http://www.opensolaris.org/os/licensing.
@@ -21,11 +20,9 @@
  */
 
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
 
 #include "mt.h"
 #include <unistd.h>
@@ -57,7 +54,7 @@
 	char *curptr;
 	struct iovec iov[T_IOV_MAX];
 	int iovcount;
-	char *dataptr;
+	char *dataptr = NULL;
 	int first_time;
 	struct _ti_user *tiptr;
 	int band;