diff options
author | mav <mav@FreeBSD.org> | 2018-03-22 23:45:01 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2018-03-22 23:45:01 +0000 |
commit | 30d2b85f59c27b6ab5f0fec8af3eb74bd7623ea6 (patch) | |
tree | b69dca0a9989a16b24b0367ad782c37eb1df5daa /cddl/contrib/opensolaris | |
parent | 7d2bd48b7863420123ec86ad4f10172d0a502d0d (diff) | |
download | FreeBSD-src-30d2b85f59c27b6ab5f0fec8af3eb74bd7623ea6.zip FreeBSD-src-30d2b85f59c27b6ab5f0fec8af3eb74bd7623ea6.tar.gz |
MFC r329657 (by asomers): Fix memory leaks in zdb introduced by r329508
Reported by: Coverity
CID: 1386185
Diffstat (limited to 'cddl/contrib/opensolaris')
-rw-r--r-- | cddl/contrib/opensolaris/cmd/zdb/zdb.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cddl/contrib/opensolaris/cmd/zdb/zdb.c b/cddl/contrib/opensolaris/cmd/zdb/zdb.c index 1ddb3db..82d0a32 100644 --- a/cddl/contrib/opensolaris/cmd/zdb/zdb.c +++ b/cddl/contrib/opensolaris/cmd/zdb/zdb.c @@ -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; } |