[wing] namedpipelistener: do not close the handle if it is invalid
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [wing] namedpipelistener: do not close the handle if it is invalid
- Date: Thu, 14 Jul 2016 11:22:12 +0000 (UTC)
commit b9f73c5a081673ae8f7118ec28039974d933712a
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Thu Jul 14 13:21:05 2016 +0200
namedpipelistener: do not close the handle if it is invalid
wing/wingnamedpipelistener.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/wing/wingnamedpipelistener.c b/wing/wingnamedpipelistener.c
index de2409a..a9bdaab 100644
--- a/wing/wingnamedpipelistener.c
+++ b/wing/wingnamedpipelistener.c
@@ -68,7 +68,8 @@ static void
pipe_data_free (PipeData *data)
{
g_free (data->pipe_name);
- CloseHandle (data->handle);
+ if (data->handle != INVALID_HANDLE_VALUE)
+ CloseHandle (data->handle);
CloseHandle (data->overlapped.hEvent);
g_clear_object (&data->source_object);
g_slice_free (PipeData, data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]