Commit f68b07bf authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

No need to copy module in message item

parent 0c86c2c9
...@@ -50,7 +50,7 @@ typedef struct ...@@ -50,7 +50,7 @@ typedef struct
int i_type; /**< message type, see below */ int i_type; /**< message type, see below */
uintptr_t i_object_id; uintptr_t i_object_id;
const char *psz_object_type; const char *psz_object_type;
char * psz_module; const char *psz_module;
char * psz_msg; /**< the message itself */ char * psz_msg; /**< the message itself */
char * psz_header; /**< Additional header */ char * psz_header; /**< Additional header */
} msg_item_t; } msg_item_t;
...@@ -80,7 +80,7 @@ static inline msg_item_t *msg_Copy (const msg_item_t *msg) ...@@ -80,7 +80,7 @@ static inline msg_item_t *msg_Copy (const msg_item_t *msg)
static inline void msg_Free (msg_item_t *msg) static inline void msg_Free (msg_item_t *msg)
{ {
free (msg->psz_module); free ((char *)msg->psz_module);
free (msg->psz_msg); free (msg->psz_msg);
free (msg->psz_header); free (msg->psz_header);
free (msg); free (msg);
......
...@@ -370,7 +370,7 @@ void msg_GenericVa (vlc_object_t *p_this, int i_type, ...@@ -370,7 +370,7 @@ void msg_GenericVa (vlc_object_t *p_this, int i_type,
msg.i_type = i_type; msg.i_type = i_type;
msg.i_object_id = (uintptr_t)p_this; msg.i_object_id = (uintptr_t)p_this;
msg.psz_object_type = p_this->psz_object_type; msg.psz_object_type = p_this->psz_object_type;
msg.psz_module = strdup( psz_module ); msg.psz_module = psz_module;
msg.psz_msg = psz_str; msg.psz_msg = psz_str;
char *psz_header = NULL; char *psz_header = NULL;
...@@ -439,7 +439,6 @@ void msg_GenericVa (vlc_object_t *p_this, int i_type, ...@@ -439,7 +439,6 @@ void msg_GenericVa (vlc_object_t *p_this, int i_type,
sub->func (sub->opaque, &msg, 0); sub->func (sub->opaque, &msg, 0);
} }
vlc_rwlock_unlock (&bank->lock); vlc_rwlock_unlock (&bank->lock);
free (msg.psz_module);
free (msg.psz_msg); free (msg.psz_msg);
free (msg.psz_header); free (msg.psz_header);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment