| Submitter | Markus Armbruster |
|---|---|
| Date | Jan. 11, 2013, 10:25 a.m. |
| Message ID | <1357899902-5316-5-git-send-email-armbru@redhat.com> |
| Download | mbox | patch |
| Permalink | /patch/211291/ |
| State | New |
| Headers | show |
Comments
On Fri, Jan 11, 2013 at 11:25:00AM +0100, Markus Armbruster wrote: > Spotted by Coverity. > > Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> > --- > qga/channel-posix.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/qga/channel-posix.c b/qga/channel-posix.c > index d4fd628..5579185 100644 > --- a/qga/channel-posix.c > +++ b/qga/channel-posix.c > @@ -45,6 +45,7 @@ static gboolean ga_channel_listen_accept(GIOChannel *channel, > ret = ga_channel_client_add(c, client_fd); > if (ret) { > g_warning("error setting up connection"); > + close(client_fd); > goto out; > } > accepted = true; > -- > 1.7.11.7 >
Patch
diff --git a/qga/channel-posix.c b/qga/channel-posix.c index d4fd628..5579185 100644 --- a/qga/channel-posix.c +++ b/qga/channel-posix.c @@ -45,6 +45,7 @@ static gboolean ga_channel_listen_accept(GIOChannel *channel, ret = ga_channel_client_add(c, client_fd); if (ret) { g_warning("error setting up connection"); + close(client_fd); goto out; } accepted = true;
Spotted by Coverity. Signed-off-by: Markus Armbruster <armbru@redhat.com> --- qga/channel-posix.c | 1 + 1 file changed, 1 insertion(+)