[usr/src/usr.sbin/rpc.ypupdated/update.c:270]: (error) Resource leak: rf rf = fopen(filename, "r"); if (rf == NULL) { return (ERR_READ); } wf = fopen(tmpname, "w"); if (wf == NULL) { return (ERR_WRITE); }
Confirmed by Coverity: CID 1007425 (#1 of 1): Resource leak (RESOURCE_LEAK) 8. leaked_storage: Variable rf going out of scope leaks the storage it points to.
A commit references this bug: Author: avos Date: Mon Feb 18 03:15:25 UTC 2019 New revision: 344244 URL: https://svnweb.freebsd.org/changeset/base/344244 Log: Fix memory / resource leaks in usr.sbin/rpc.ypupdated/update.c Re-apply r343909 to this file to get the issue fixed. PR: 204956 Reported by: David Binderman <dcb314@hotmail.com> MFC after: 5 days Changes: head/usr.sbin/rpc.ypupdated/update.c
A commit references this bug: Author: avos Date: Mon Mar 4 03:30:40 UTC 2019 New revision: 344746 URL: https://svnweb.freebsd.org/changeset/base/344746 Log: MFC r344244: Fix memory / resource leaks in usr.sbin/rpc.ypupdated/update.c Re-apply r343909 to this file to get the issue fixed. PR: 204956 Reported by: David Binderman <dcb314@hotmail.com> Changes: _U stable/10/ stable/10/usr.sbin/rpc.ypupdated/update.c _U stable/11/ stable/11/usr.sbin/rpc.ypupdated/update.c _U stable/12/ stable/12/usr.sbin/rpc.ypupdated/update.c