changeset 12925:fd395ba5d913

6971450 virtinfo core dumps on SIGSEGV if libds does not exist
author Mike Christensen <Michael.Christensen@Sun.COM>
date Mon, 26 Jul 2010 14:06:42 -0700
parents c9b2c6a6a9c0
children e95332bf1454
files usr/src/lib/libv12n/sparc/libv12n.c
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/lib/libv12n/sparc/libv12n.c	Mon Jul 26 15:00:52 2010 -0400
+++ b/usr/src/lib/libv12n/sparc/libv12n.c	Mon Jul 26 14:06:42 2010 -0700
@@ -19,8 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
  */
 
 #include <dlfcn.h>
@@ -722,8 +721,10 @@
 	 * 'agent-system' client registration/message at a time.
 	 */
 	(void) mutex_lock(&v12n_ldma_lock);
-	if ((err = v12n_libds_init()) != 0)
-		goto done;
+	if ((err = v12n_libds_init()) != 0) {
+		(void) mutex_unlock(&v12n_ldma_lock);
+		return (err);
+	}
 
 	v12n_ldma_msgtype = msgtype;
 	v12n_ldma_msgstr = NULL;