mirror of
https://github.com/Genymobile/scrcpy
synced 2025-08-31 22:35:37 +00:00
Add OutOfMemory log helper
Add a special LOG_OOM() function to log all OutOfMemory errors (i.e. allocations returning NULL).
This commit is contained in:
@@ -595,6 +595,7 @@ sc_getopt_adapter_create_longopts(void) {
|
||||
struct option *longopts =
|
||||
malloc((ARRAY_LEN(options) + 1) * sizeof(*longopts));
|
||||
if (!longopts) {
|
||||
LOG_OOM();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user