mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-12-17 13:34:20 +01:00
Replace SDL_strdup() by strdup()
The functions SDL_malloc(), SDL_free() and SDL_strdup() were used only because strdup() was not available everywhere. Now that it is available, use the native version of these functions.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "control_msg.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "util/buffer_util.h"
|
||||
@@ -93,10 +94,10 @@ void
|
||||
control_msg_destroy(struct control_msg *msg) {
|
||||
switch (msg->type) {
|
||||
case CONTROL_MSG_TYPE_INJECT_TEXT:
|
||||
SDL_free(msg->inject_text.text);
|
||||
free(msg->inject_text.text);
|
||||
break;
|
||||
case CONTROL_MSG_TYPE_SET_CLIPBOARD:
|
||||
SDL_free(msg->set_clipboard.text);
|
||||
free(msg->set_clipboard.text);
|
||||
break;
|
||||
default:
|
||||
// do nothing
|
||||
|
||||
Reference in New Issue
Block a user