Commit 227fb138 authored by David Fuhrmann's avatar David Fuhrmann

macosx: fix some strdup memleaks

parent 3a96bb0f
...@@ -859,9 +859,12 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -859,9 +859,12 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
case CONFIG_ITEM_DIRECTORY: case CONFIG_ITEM_DIRECTORY:
case CONFIG_ITEM_MODULE: case CONFIG_ITEM_MODULE:
case CONFIG_ITEM_MODULE_LIST: case CONFIG_ITEM_MODULE_LIST:
case CONFIG_ITEM_MODULE_LIST_CAT: case CONFIG_ITEM_MODULE_LIST_CAT: {
config_PutPsz(VLCIntf, psz_name, [self stringValue]); char *psz_val = [self stringValue];
config_PutPsz(VLCIntf, psz_name, psz_val);
free(psz_val);
break; break;
}
case CONFIG_ITEM_KEY: case CONFIG_ITEM_KEY:
/* So you don't need to restart to have the changes take effect */ /* So you don't need to restart to have the changes take effect */
val.i_int = [self intValue]; val.i_int = [self intValue];
......
...@@ -771,7 +771,7 @@ static inline void save_module_list(intf_thread_t * p_intf, id object, const cha ...@@ -771,7 +771,7 @@ static inline void save_module_list(intf_thread_t * p_intf, id object, const cha
if (p_item->i_type == CONFIG_ITEM_MODULE && module_provides(p_parser, p_item->psz_type)) { if (p_item->i_type == CONFIG_ITEM_MODULE && module_provides(p_parser, p_item->psz_type)) {
if ([objectTitle isEqualToString: _NS(module_GetLongName(p_parser))]) { if ([objectTitle isEqualToString: _NS(module_GetLongName(p_parser))]) {
config_PutPsz(p_intf, name, strdup(module_get_name(p_parser, false))); config_PutPsz(p_intf, name, module_get_name(p_parser, false));
break; break;
} }
} }
......
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