Skip to content

Display and control your Android device

Fix memory leak on error

Romain Vimont3333e67452e5
diff --git a/app/src/adb/adb.c b/app/src/adb/adb.c
index 54375451..15c9c85a 100644
--- a/app/src/adb/adb.c
+++ b/app/src/adb/adb.c
@@ -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;
}