mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-08-03 14:49:29 +00:00
change free to SDL_free and log msg
This commit is contained in:
parent
716ca9761e
commit
0f9f3a3a12
1 changed files with 6 additions and 4 deletions
|
@ -5,7 +5,10 @@
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
|
|
||||||
// apk queue
|
// NOTE(adopi) this can be more generic:
|
||||||
|
// it could be used with a command queue instead of a filename queue
|
||||||
|
// then we would have a generic invoker (useful if we want to handle more async commands)
|
||||||
|
|
||||||
SDL_bool apk_queue_is_empty(const struct apk_queue *queue) {
|
SDL_bool apk_queue_is_empty(const struct apk_queue *queue) {
|
||||||
return queue->head == queue->tail;
|
return queue->head == queue->tail;
|
||||||
}
|
}
|
||||||
|
@ -103,10 +106,9 @@ static int run_installer(void *data) {
|
||||||
char* apk = "";
|
char* apk = "";
|
||||||
while (apk_queue_take(&installer->queue, apk)) {
|
while (apk_queue_take(&installer->queue, apk)) {
|
||||||
SDL_bool ok = process_install(installer,apk);
|
SDL_bool ok = process_install(installer,apk);
|
||||||
free(apk);
|
SDL_free(apk);
|
||||||
apk = NULL;
|
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
LOGD("Cannot write event to socket");
|
LOGD("Error during installation");
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue