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
This commit is contained in:
parent
f91f3926e0
commit
d4c225b01c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=329657
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user