Project

General

Profile

Bug #8416

Wt crashes in ~Configuration

Added by Kirill Poteryaev 5 months ago. Updated 5 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
04/27/2021
Due date:
% Done:

0%

Estimated time:

Description

Hello!
I faced with problem using Wt. My program failed in the begin of execution.
After research I realized, that problem was in http/Configuration.C:

Configuration::~Configuration()
{
    if (parentPort_ == -1)
            unlink(pidPath_.c_str());
}

pidPath_ was empty, and programm stopped after unlink function call.
So I have to add a non empty string checking, like this:

Configuration::~Configuration()
{
    if (parentPort_ == -1)
       if(!pidPath_.empty())          // <------------
            unlink(pidPath_.c_str());
}

I am not sure it is correct, but program no more crashes.
Have you ever faced with something like this?

Also available in: Atom PDF