[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] nbd/server: Suppress Broken pipe errors on abrupt disconnect
From: |
Richard W.M. Jones |
Subject: |
Re: [PATCH] nbd/server: Suppress Broken pipe errors on abrupt disconnection |
Date: |
Mon, 13 Sep 2021 16:16:31 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Mon, Sep 13, 2021 at 05:07:12PM +0200, Kevin Wolf wrote:
> > > if (ret < 0) {
> > > - error_prepend(&local_err, "Failed to send reply: ");
> > > + if (errno != EPIPE) {
> > > + error_prepend(&local_err, "Failed to send reply: ");
> > > + } else {
> > > + local_err = NULL;
> >
> > This line should be error_free(local_err) to avoid a memleak.
>
> Actually, you want both error_free(local_err) and local_err = NULL.
Give me a few mins to test an post a new version that at least
fixes this bug ...
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/