diff options
author | luozhengzheng <[email protected]> | 2016-10-12 01:24:18 +0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-10-11 10:24:18 -0700 |
commit | fad5fb01adaf34602969dd3b3ffe250c2cf273cc (patch) | |
tree | 0cb4156ee00264bacde96c15744655c8512c7f5f /lib/libzfs | |
parent | 1697d2dcf1735e6f2493abff1da01001637f14bf (diff) |
Fix memory leak in recv_skip
When the exception branch exits, the buf is leaked.
Reviewed by: Richard Laager <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: luozhengzheng <[email protected]>
Closes #5262
Diffstat (limited to 'lib/libzfs')
-rw-r--r-- | lib/libzfs/libzfs_sendrecv.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c index ff84a1acd..55131369e 100644 --- a/lib/libzfs/libzfs_sendrecv.c +++ b/lib/libzfs/libzfs_sendrecv.c @@ -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)); } } |