Diff between d3a95e3088addbab08a14d5ead0feebba2d11c28 and 4f7b4fd3214f2a6e55d41c9052aa061b0dd647fe

Changed Files

File Additions Deletions Status
tools/sdptool.c +3 -2 modified

Full Patch

diff --git a/tools/sdptool.c b/tools/sdptool.c
index 458d005..0a949f2 100644
--- a/tools/sdptool.c
+++ b/tools/sdptool.c
@@ -3812,9 +3812,10 @@ static int do_search(bdaddr_t *bdaddr, struct search_context *context)
 			break;
 		}
 
+		/* Set the subcontext for browsing the sub tree */
+		memcpy(&sub_context, context, sizeof(struct search_context));
+
 		if (sdp_get_group_id(rec, &sub_context.group) != -1) {
-			/* Set the subcontext for browsing the sub tree */
-			memcpy(&sub_context, context, sizeof(struct search_context));
 			/* Browse the next level down if not done */
 			if (sub_context.group.value.uuid16 != context->group.value.uuid16)
 				do_search(bdaddr, &sub_context);