From owner-freebsd-doc@FreeBSD.ORG Thu Nov 2 15:33:10 2006 Return-Path: X-Original-To: doc@freebsd.org Delivered-To: freebsd-doc@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A440B16A4C9 for ; Thu, 2 Nov 2006 15:33:10 +0000 (UTC) (envelope-from sbaskinger@lumeta.com) Received: from MAIL.corp.lumeta.com (h65-246-245-23.lumeta.com [65.246.245.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2307643D5F for ; Thu, 2 Nov 2006 15:33:09 +0000 (GMT) (envelope-from sbaskinger@lumeta.com) Received: from [65.246.246.82] ([65.246.246.82]) by MAIL.corp.lumeta.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 2 Nov 2006 10:33:09 -0500 Message-ID: <454A0F6B.1040707@lumeta.com> Date: Thu, 02 Nov 2006 10:31:55 -0500 From: Sam Baskinger Organization: Lumeta Corporation User-Agent: Thunderbird 1.5.0.7 (X11/20060926) MIME-Version: 1.0 To: doc@freebsd.org X-Enigmail-Version: 0.94.1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 02 Nov 2006 15:33:09.0277 (UTC) FILETIME=[331CACD0:01C6FE94] Cc: Subject: Freeing Vs Nulling in pam_conv sample. X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Nov 2006 15:33:10 -0000 Hey All, I was reading the sample pam_conv as an example and suspect there might be a tiny error at the end of the function converse(..) in the doc "Sample PAM Conversation Function" at URL: http://www.freebsd.org/doc/en_US.ISO8859-1/articles/pam/pam-sample-conv.html At the label "fail" we clear the variable aresp (3 lines from the end), then set *resp to NULL (2 lines from the end) and return a conversation error. My concern is who will free our calloc'ed aresp memory? Hope this helps (and I'm not overlooking something silly). :) Sam -- Lumeta Corporation 732.357.3545 (office) 732.564.0731 (fax) sbaskinger@lumeta.com www.lumeta.com The world's most security conscious organizations rely on Lumeta to find and prioritize what's in IT, so they can manage and secure IT better. Lumeta Corporation 220 Davidson Ave, 4th Floor Somerset, NJ 08873