Date: Wed, 1 Jun 2016 17:18:36 +0000 (UTC) From: Don Lewis <truckman@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r301143 - stable/10/usr.sbin/ypserv Message-ID: <201606011718.u51HIapf048479@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: truckman Date: Wed Jun 1 17:18:35 2016 New Revision: 301143 URL: https://svnweb.freebsd.org/changeset/base/301143 Log: MFC r300635 Call free(cur) if strdup(dirp->d_name) fails to avoid a memory leak. Reported by: Coverity CID: 1007414 Modified: stable/10/usr.sbin/ypserv/yp_server.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ypserv/yp_server.c ============================================================================== --- stable/10/usr.sbin/ypserv/yp_server.c Wed Jun 1 17:16:35 2016 (r301142) +++ stable/10/usr.sbin/ypserv/yp_server.c Wed Jun 1 17:18:35 2016 (r301143) @@ -711,6 +711,7 @@ yp_maplist_create(const char *domain) yp_error("strdup() failed: %s",strerror(errno)); closedir(dird); yp_maplist_free(yp_maplist); + free(cur); return(NULL); } cur->next = yp_maplist;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606011718.u51HIapf048479>