Skip to content

Commit 1ec753f

Browse files
author
Philip Kaufmann
committed
[Qt] ensure socket is set to NULL in PaymentServer::ipcSendCommandLine
1 parent 814429d commit 1ec753f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/qt/paymentserver.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ bool PaymentServer::ipcSendCommandLine()
263263
if (!socket->waitForConnected(BITCOIN_IPC_CONNECT_TIMEOUT))
264264
{
265265
delete socket;
266+
socket = NULL;
266267
return false;
267268
}
268269

@@ -271,12 +272,14 @@ bool PaymentServer::ipcSendCommandLine()
271272
out.setVersion(QDataStream::Qt_4_0);
272273
out << r;
273274
out.device()->seek(0);
275+
274276
socket->write(block);
275277
socket->flush();
276-
277278
socket->waitForBytesWritten(BITCOIN_IPC_CONNECT_TIMEOUT);
278279
socket->disconnectFromServer();
280+
279281
delete socket;
282+
socket = NULL;
280283
fResult = true;
281284
}
282285

0 commit comments

Comments
 (0)