[PATCH obexd 2/4] src: Use goto for avoiding code duplication

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 src/manager.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/manager.c b/src/manager.c
index 87010c4..b9786ad 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -607,8 +607,7 @@ void manager_register_session(struct obex_session *os)
 				session_methods, NULL,
 				NULL, os, NULL)) {
 		error("Cannot register Session interface.");
-		g_free(path);
-		return;
+		goto done;
 	}
 
 	g_dbus_emit_signal(connection, OPENOBEX_MANAGER_PATH,
@@ -616,6 +615,7 @@ void manager_register_session(struct obex_session *os)
 			DBUS_TYPE_OBJECT_PATH, &path,
 			DBUS_TYPE_INVALID);
 
+done:
 	g_free(path);
 }
 
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux