For example sign IPA with a "wrong" mobile provision and try to install it on device.
Installation fails as expected but there malformed leftover remains.
Proposing adding following code to the ideviceinstaller.c
...
idevice_wait_for_command_to_complete();
res = 0;
if (cmd == CMD_INSTALL && err_occurred && bundleidentifier) {
instproxy_uninstall(ipc, bundleidentifier, NULL, NULL, NULL);
wait_for_command_complete = 0; // dont care ...
notification_expected = 0;
}
/* not needed anymore */
lockdownd_client_free(client);
client = NULL;