Diff between 5eaaa14b5b9c8f1a83d291439f4dcef60a5bfeca and a0fd2e4494f5c35152fe523d271ac7304ecb4591

Changed Files

File Additions Deletions Status
tools/obex-client-tool.c +4 -1 modified

Full Patch

diff --git a/tools/obex-client-tool.c b/tools/obex-client-tool.c
index 4f931f6..d0ba8a6 100644
--- a/tools/obex-client-tool.c
+++ b/tools/obex-client-tool.c
@@ -432,6 +432,7 @@ int main(int argc, char *argv[])
 	if (err != NULL) {
 		g_printerr("%s\n", err->message);
 		g_error_free(err);
+		g_option_context_free(context);
 		exit(EXIT_FAILURE);
 	}
 
@@ -445,8 +446,10 @@ int main(int argc, char *argv[])
 	else
 		io = unix_connect(transport);
 
-	if (io == NULL)
+	if (io == NULL) {
+		g_option_context_free(context);
 		exit(EXIT_FAILURE);
+	}
 
 	memset(&sa, 0, sizeof(sa));
 	sa.sa_handler = sig_term;