From owner-p4-projects@FreeBSD.ORG Fri Jul 7 16:01:56 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9C8E216A4E7; Fri, 7 Jul 2006 16:01:56 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7894D16A4DE for ; Fri, 7 Jul 2006 16:01:56 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F6ED43D4C for ; Fri, 7 Jul 2006 16:01:56 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k67G1tfS033101 for ; Fri, 7 Jul 2006 16:01:56 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k67G1t50033098 for perforce@freebsd.org; Fri, 7 Jul 2006 16:01:55 GMT (envelope-from jhb@freebsd.org) Date: Fri, 7 Jul 2006 16:01:55 GMT Message-Id: <200607071601.k67G1t50033098@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Cc: Subject: PERFORCE change 100890 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2006 16:01:56 -0000 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