Fix memory leak on error

Fixes #4636 <https://github.com/Genymobile/scrcpy/issues/4636>
This commit is contained in:
Romain Vimont 2024-02-01 09:18:14 +01:00
parent 7c53a29d72
commit 3333e67452

View file

@ -458,6 +458,7 @@ sc_adb_list_devices(struct sc_intr *intr, unsigned flags,
// in the buffer in a single pass
LOGW("Result of \"adb devices -l\" does not fit in 64Kb. "
"Please report an issue.");
free(buf);
return false;
}