From: Michal Bloch Date: Mon, 24 Jan 2022 17:39:50 +0000 (+0100) Subject: libdbus-p2p: fix a memory error X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=36c895c027de963bbdedc5ed629d98dd221ced6d;p=platform%2Fcore%2Fsystem%2Fdbus-tools.git libdbus-p2p: fix a memory error Change-Id: Ibd6adc341610e59ba0432fcd89b30cef609fdc24 Signed-off-by: Michal Bloch --- diff --git a/benchmark/libdbus-p2p-server.cpp b/benchmark/libdbus-p2p-server.cpp index 0540dfd..f231e5a 100644 --- a/benchmark/libdbus-p2p-server.cpp +++ b/benchmark/libdbus-p2p-server.cpp @@ -297,6 +297,9 @@ void dispatch_connection (conn_with_metadata & cwm, bool busy_wait) struct DBusServer_deleter { void operator () (DBusServer * server) { + if (!server) + return; + dbus_server_disconnect (server); dbus_server_unref (server); }