blob: 3e14ccec010cdeb40f0db98b26aaa07d2f13e8df (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
From 4cede77f510443b5119644e9c54c6a5f9f1ba791 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hubert=20Figui=C3=A8re?= <hub@figuiere.net>
Date: Sat, 1 Jun 2024 19:41:51 -0400
Subject: [PATCH 2/5] Fix crash
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Hubert Figuière <hub@figuiere.net>
---
src/ES2Command/Src/Interface/ipc/ipcInterfaceImpl.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/ES2Command/Src/Interface/ipc/ipcInterfaceImpl.cpp b/src/ES2Command/Src/Interface/ipc/ipcInterfaceImpl.cpp
index 86e9969..eb17c22 100644
--- a/src/ES2Command/Src/Interface/ipc/ipcInterfaceImpl.cpp
+++ b/src/ES2Command/Src/Interface/ipc/ipcInterfaceImpl.cpp
@@ -133,7 +133,9 @@ ESErrorCode IPCInterfaceImpl::Open()
if(!ES_IsExistFile(dat_file)){
FILE *fp;
fp = fopen(dat_file.c_str(),"w");
- fclose(fp);
+ if (fp) {
+ fclose(fp);
+ }
}
interrupt_.reset(new ipc_interrupt(delegate_, dat_file, IPC_SHARED_ID, IPC_SEMAHORE_KEY));
--
2.51.0
|