Don't strdup a freed pointer in ipc_connect
When ipc_check() attempts to reconnect it passes ipc_parent as the target to connect to. ipc_connect() then reconnects and frees ipc_parent and sets it to strdup(target). When target is equal to ipc_parent this means we're strduping a freed pointer and reconnecting a second time (or using ipc_parent anywhere subsequently) will fail. Add a check to make sure they're not pointing to the same thing.
Loading
Please register or sign in to comment