mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-12-20 15:04:19 +01:00
Fix leak on file pusher error
If a file_push request fails, the allocated filename must be freed.
This commit is contained in:
@@ -187,7 +187,10 @@ handle_event(struct scrcpy *s, const struct scrcpy_options *options,
|
|||||||
} else {
|
} else {
|
||||||
action = SC_FILE_PUSHER_ACTION_PUSH_FILE;
|
action = SC_FILE_PUSHER_ACTION_PUSH_FILE;
|
||||||
}
|
}
|
||||||
sc_file_pusher_request(&s->file_pusher, action, file);
|
bool ok = sc_file_pusher_request(&s->file_pusher, action, file);
|
||||||
|
if (!ok) {
|
||||||
|
free(file);
|
||||||
|
}
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user