Changeset: 32cf81859e1b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=32cf81859e1b
Modified Files:
        tools/merovingian/daemon/connections.c
        tools/merovingian/daemon/forkmserver.c
Branch: Oct2020
Log Message:

Coverity fixes.


diffs (32 lines):

diff --git a/tools/merovingian/daemon/connections.c 
b/tools/merovingian/daemon/connections.c
--- a/tools/merovingian/daemon/connections.c
+++ b/tools/merovingian/daemon/connections.c
@@ -76,7 +76,6 @@ openConnectionIP(int *socks, bool udp, b
                                                           (const char *) &on, 
sizeof on) < 0) {
                                        e = errno;
                                        closesocket(sock);
-                                       sock = -1;
                                        continue;
                                }
 #ifdef SO_EXCLUSIVEADDRUSE
diff --git a/tools/merovingian/daemon/forkmserver.c 
b/tools/merovingian/daemon/forkmserver.c
--- a/tools/merovingian/daemon/forkmserver.c
+++ b/tools/merovingian/daemon/forkmserver.c
@@ -934,12 +934,15 @@ fork_profiler(const char *dbname, sabdb 
                snprintf(profiler_executable, executable_len, "%s%s%s",
                                 tmp_exe, profiler_filename, s + 8);
                free(tmp_exe);
-               /* coverity[toctou] */
+#ifndef STATIC_CODE_ANALYSIS
+               /* hide for coverity: time-of-check time-of-use; it's ok to do
+                * this since if the file were to disappear between this check
+                * and the use, things won't fall apart */
                if (stat(profiler_executable, &path_info) == -1) {
                        error = newErr("Cannot find profiler executable");
                        goto cleanup;
                }
-               /* free(tmp_exe); */
+#endif
        }
 
        /* Verify that the requested db is running */
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to