Date: Mon, 14 Jun 2010 21:33:18 +0000 (UTC) From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r209180 - head/sbin/hastd Message-ID: <201006142133.o5ELXIAf076746@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pjd Date: Mon Jun 14 21:33:18 2010 New Revision: 209180 URL: http://svn.freebsd.org/changeset/base/209180 Log: Plug memory leak. Found by: Coverity Prevent CID: 7051 MFC after: 3 days Modified: head/sbin/hastd/nv.c Modified: head/sbin/hastd/nv.c ============================================================================== --- head/sbin/hastd/nv.c Mon Jun 14 21:25:20 2010 (r209179) +++ head/sbin/hastd/nv.c Mon Jun 14 21:33:18 2010 (r209180) @@ -707,8 +707,10 @@ nv_add(struct nv *nv, const unsigned cha assert(errno != 0); if (nv->nv_error == 0) nv->nv_error = errno; + free(nvh); return; } + free(nvh); /* Add the actual data. */ if (ebuf_add_tail(nv->nv_ebuf, value, vsize) < 0) { assert(errno != 0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006142133.o5ELXIAf076746>