Push bundleidentifier variable further out in scope to allow broader use
diff --git a/src/ideviceinstaller.c b/src/ideviceinstaller.c
index d1fcfc1..32f488a 100644
--- a/src/ideviceinstaller.c
+++ b/src/ideviceinstaller.c
@@ -493,6 +493,7 @@
 	uint16_t service = 0;
 #endif
 	int res = 0;
+	char *bundleidentifier = NULL;
 
 	parse_opts(argc, argv);
 
@@ -876,7 +877,6 @@
 			}
 
 			char *bundleexecutable = NULL;
-			char *bundleidentifier = NULL;
 
 			plist_t bname = plist_dict_get_item(info, "CFBundleExecutable");
 			if (bname) {
@@ -1314,7 +1314,10 @@
 
 	idevice_wait_for_operation_to_complete();
 
-  leave_cleanup:
+leave_cleanup:
+	if (bundleidentifier) {
+		free(bundleidentifier);
+	}
 	if (np) {
 		np_client_free(np);
 	}