svn commit: r329657 - head/cddl/contrib/opensolaris/cmd/zdb
Alan Somers
asomers at FreeBSD.org
Tue Feb 20 19:54:07 UTC 2018
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;
}
More information about the svn-src-all
mailing list