Date: Tue, 20 Feb 2018 19:54:07 +0000 (UTC) From: Alan Somers <asomers@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329657 - head/cddl/contrib/opensolaris/cmd/zdb Message-ID: <201802201954.w1KJs7cu033827@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: asomers Date: Tue Feb 20 19:54:06 2018 New Revision: 329657 URL: https://svnweb.freebsd.org/changeset/base/329657 Log: Fix memory leaks in zdb introduced by r329508 Reported by: Coverity CID: 1386185 MFC after: 3 weeks X-MFC-With: 329508 Sponsored by: Spectra Logic Corp Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Tue Feb 20 19:39:48 2018 (r329656) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Tue Feb 20 19:54:06 2018 (r329657) @@ -3570,6 +3570,7 @@ zdb_read_block(char *thing, spa_t *spa) s = "offset must be a multiple of sector size"; if (s) { (void) printf("Invalid block specifier: %s - %s\n", thing, s); + free(flagstr); free(dup); return; } @@ -3595,6 +3596,7 @@ zdb_read_block(char *thing, spa_t *spa) blkptr_offset = strtoull(p, &p, 16); if (*p != ':' && *p != '\0') { (void) printf("***Invalid flag arg: '%s'\n", s); + free(flagstr); free(dup); return; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802201954.w1KJs7cu033827>