diff --git a/clamd/session.c b/clamd/session.c index 4a2e18b8bc..dff12232b3 100644 --- a/clamd/session.c +++ b/clamd/session.c @@ -591,8 +591,10 @@ int execute_or_dispatch_command(client_conn_t *conn, enum commands cmd, const ch } case COMMAND_INSTREAM: { int rc = cli_gentempfd(optget(conn->opts, "TemporaryDirectory")->strarg, &conn->filename, &conn->scanfd); - if (rc != CL_SUCCESS) - return rc; + if (rc != CL_SUCCESS) { + logg(LOGG_ERROR, "Failed to generate file in TemporaryDirectory, filename: %s \n", &conn->filename); + return 1; + } conn->quota = optget(conn->opts, "StreamMaxLength")->numarg; conn->mode = MODE_STREAM; return 0;