Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Jul 2006 16:01:55 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 100890 for review
Message-ID:  <200607071601.k67G1t50033098@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=100890

Change 100890 by jhb@jhb_mutex on 2006/07/07 16:01:44

	Don't try to free name in the !uap->name case as it is just
	garbage.

Affected files ...

.. //depot/projects/smpng/sys/kern/uipc_syscalls.c#81 edit

Differences ...

==== //depot/projects/smpng/sys/kern/uipc_syscalls.c#81 (text+ko) ====

@@ -328,8 +328,8 @@
 		if (error == 0)
 			error = copyout(&namelen, uap->anamelen,
 			    sizeof(namelen));
+		free(name, M_SONAME);
 	}
-	free(name, M_SONAME);
 	return (error);
 }
 
@@ -468,7 +468,8 @@
 		sa = NULL;
 	}
 noconnection:
-	free(sa, M_SONAME);
+	if (sa)
+		FREE(sa, M_SONAME);
 
 	/*
 	 * close the new descriptor, assuming someone hasn't ripped it



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607071601.k67G1t50033098>