Fix memory leak in recv_skip
When the exception branch exits, the buf is leaked. Reviewed by: Richard Laager <rlaager@wiktel.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: luozhengzheng <luo.zhengzheng@zte.com.cn> Closes #5262
This commit is contained in:
parent
1697d2dcf1
commit
fad5fb01ad
@ -3025,6 +3025,7 @@ recv_skip(libzfs_handle_t *hdl, int fd, boolean_t byteswap)
|
||||
default:
|
||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
||||
"invalid record type"));
|
||||
free(buf);
|
||||
return (zfs_error(hdl, EZFS_BADSTREAM, errbuf));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user