From owner-svn-src-all@FreeBSD.ORG Sun Aug 24 17:02:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA947F42; Sun, 24 Aug 2014 17:02:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5CF3300A; Sun, 24 Aug 2014 17:02:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7OH2RVc016155; Sun, 24 Aug 2014 17:02:27 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7OH2RGA016154; Sun, 24 Aug 2014 17:02:27 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201408241702.s7OH2RGA016154@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 24 Aug 2014 17:02:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270506 - head/lib/libproc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Aug 2014 17:02:27 -0000 Author: markj Date: Sun Aug 24 17:02:27 2014 New Revision: 270506 URL: http://svnweb.freebsd.org/changeset/base/270506 Log: Fix a bug in r265255: only return NULL if the requested map wasn't found. Submitted by: Luke Chang-Hsien Tsai MFC after: 1 week Modified: head/lib/libproc/proc_sym.c Modified: head/lib/libproc/proc_sym.c ============================================================================== --- head/lib/libproc/proc_sym.c Sun Aug 24 16:40:31 2014 (r270505) +++ head/lib/libproc/proc_sym.c Sun Aug 24 17:02:27 2014 (r270506) @@ -121,10 +121,12 @@ proc_obj2map(struct proc_handle *p, cons break; } } - if (rdl == NULL && strcmp(objname, "a.out") == 0 && p->rdexec != NULL) - rdl = p->rdexec; - else - return (NULL); + if (rdl == NULL) { + if (strcmp(objname, "a.out") == 0 && p->rdexec != NULL) + rdl = p->rdexec; + else + return (NULL); + } if ((map = malloc(sizeof(*map))) == NULL) return (NULL);