Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wpanctl] free dbus connection and error on exit. #468

Merged
merged 1 commit into from May 30, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
[wpanctl] free dbus connection and error on exit.
  • Loading branch information
abtink committed May 29, 2020
commit 0e5d1601febb869f583e944785e5685c6c747be7
8 changes: 7 additions & 1 deletion src/wpanctl/wpanctl.c
Expand Up @@ -435,7 +435,7 @@ int main(int argc, char * argv[])
int c;
bool ignore_driver_version_mismatch = false;
DBusError error;
DBusConnection* connection;
DBusConnection* connection = NULL;

dbus_error_init(&error);

Expand Down Expand Up @@ -715,5 +715,11 @@ int main(int argc, char * argv[])
if (gRet == ERRORCODE_QUIT)
gRet = 0;

if (connection) {
dbus_connection_unref(connection);
}

dbus_error_free(&error);

return gRet;
}