mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-10-29 05:40:25 -04:00 
			
		
		
		
	remove superfluous free() checks
free() correctly handles NULL pointers, so we can omit explicit checks for that condition.
This commit is contained in:
		
							parent
							
								
									45850439b3
								
							
						
					
					
						commit
						4433248bf3
					
				
					 33 changed files with 108 additions and 205 deletions
				
			
		|  | @ -165,7 +165,6 @@ static void free_object(struct alisp_object * p) | ||||||
| 	switch (alisp_get_type(p)) { | 	switch (alisp_get_type(p)) { | ||||||
| 	case ALISP_OBJ_STRING: | 	case ALISP_OBJ_STRING: | ||||||
| 	case ALISP_OBJ_IDENTIFIER: | 	case ALISP_OBJ_IDENTIFIER: | ||||||
| 		if (p->value.s) |  | ||||||
| 		free(p->value.s); | 		free(p->value.s); | ||||||
| 		alisp_set_type(p, ALISP_OBJ_INTEGER); | 		alisp_set_type(p, ALISP_OBJ_INTEGER); | ||||||
| 		break; | 		break; | ||||||
|  | @ -523,7 +522,6 @@ static int init_lex(struct alisp_instance *instance) | ||||||
| 
 | 
 | ||||||
| static void done_lex(struct alisp_instance *instance) | static void done_lex(struct alisp_instance *instance) | ||||||
| { | { | ||||||
| 	if (instance->token_buffer) |  | ||||||
| 	free(instance->token_buffer); | 	free(instance->token_buffer); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -1184,7 +1182,6 @@ static struct alisp_object * F_concat(struct alisp_instance *instance, struct al | ||||||
| 			str1 = realloc(str, (str ? strlen(str) : 0) + strlen(p1->value.s) + 1); | 			str1 = realloc(str, (str ? strlen(str) : 0) + strlen(p1->value.s) + 1); | ||||||
| 			if (str1 == NULL) { | 			if (str1 == NULL) { | ||||||
| 				nomem(); | 				nomem(); | ||||||
| 				if (str) |  | ||||||
| 				free(str); | 				free(str); | ||||||
| 				return NULL; | 				return NULL; | ||||||
| 			} | 			} | ||||||
|  | @ -2366,7 +2363,6 @@ static struct alisp_object * eval_func(struct alisp_instance *instance, struct a | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
|                _end: |                _end: | ||||||
| 		if (eval_objs) |  | ||||||
| 		free(eval_objs); | 		free(eval_objs); | ||||||
| 
 | 
 | ||||||
| 		return p4; | 		return p4; | ||||||
|  |  | ||||||
							
								
								
									
										18
									
								
								src/conf.c
									
										
									
									
									
								
							
							
						
						
									
										18
									
								
								src/conf.c
									
										
									
									
									
								
							|  | @ -980,7 +980,6 @@ static int parse_value(snd_config_t **_n, snd_config_t *father, input_t *input, | ||||||
| 		if (err < 0) | 		if (err < 0) | ||||||
| 			return err; | 			return err; | ||||||
| 	} | 	} | ||||||
| 	if (n->u.string) |  | ||||||
| 	free(n->u.string); | 	free(n->u.string); | ||||||
| 	n->u.string = s; | 	n->u.string = s; | ||||||
| 	*_n = n; | 	*_n = n; | ||||||
|  | @ -1056,7 +1055,6 @@ static int parse_array_def(snd_config_t *father, input_t *input, int idx, int sk | ||||||
| 	} | 	} | ||||||
| 	err = 0; | 	err = 0; | ||||||
|       __end: |       __end: | ||||||
|       	if (id) |  | ||||||
| 	free(id); | 	free(id); | ||||||
|       	return err; |       	return err; | ||||||
| } | } | ||||||
|  | @ -1218,7 +1216,6 @@ static int parse_def(snd_config_t *father, input_t *input, int skip, int overrid | ||||||
| 		unget_char(c, input); | 		unget_char(c, input); | ||||||
| 	} | 	} | ||||||
|       __end: |       __end: | ||||||
|       	if (id) |  | ||||||
| 	free(id); | 	free(id); | ||||||
| 	return err; | 	return err; | ||||||
| } | } | ||||||
|  | @ -1446,7 +1443,6 @@ int snd_config_substitute(snd_config_t *dst, snd_config_t *src) | ||||||
| 		if (err < 0) | 		if (err < 0) | ||||||
| 			return err; | 			return err; | ||||||
| 	} | 	} | ||||||
| 	if (dst->id) |  | ||||||
| 	free(dst->id); | 	free(dst->id); | ||||||
| 	dst->id = src->id; | 	dst->id = src->id; | ||||||
| 	dst->type = src->type; | 	dst->type = src->type; | ||||||
|  | @ -1528,7 +1524,6 @@ int snd_config_set_id(snd_config_t *config, const char *id) | ||||||
| 	new_id = strdup(id); | 	new_id = strdup(id); | ||||||
| 	if (!new_id) | 	if (!new_id) | ||||||
| 		return -ENOMEM; | 		return -ENOMEM; | ||||||
| 	if (config->id) |  | ||||||
| 	free(config->id); | 	free(config->id); | ||||||
| 	config->id = new_id; | 	config->id = new_id; | ||||||
| 	return 0; | 	return 0; | ||||||
|  | @ -1696,7 +1691,6 @@ int snd_config_delete(snd_config_t *config) | ||||||
| 		break; | 		break; | ||||||
| 	} | 	} | ||||||
| 	case SND_CONFIG_TYPE_STRING: | 	case SND_CONFIG_TYPE_STRING: | ||||||
| 		if (config->u.string) |  | ||||||
| 		free(config->u.string); | 		free(config->u.string); | ||||||
| 		break; | 		break; | ||||||
| 	default: | 	default: | ||||||
|  | @ -1704,7 +1698,6 @@ int snd_config_delete(snd_config_t *config) | ||||||
| 	} | 	} | ||||||
| 	if (config->father) | 	if (config->father) | ||||||
| 		list_del(&config->list); | 		list_del(&config->list); | ||||||
| 	if (config->id) |  | ||||||
| 	free(config->id); | 	free(config->id); | ||||||
| 	free(config); | 	free(config); | ||||||
| 	return 0; | 	return 0; | ||||||
|  | @ -2023,7 +2016,6 @@ int snd_config_set_string(snd_config_t *config, const char *value) | ||||||
| 	} else { | 	} else { | ||||||
| 		new_string = NULL; | 		new_string = NULL; | ||||||
| 	} | 	} | ||||||
| 	if (config->u.string) |  | ||||||
| 	free(config->u.string); | 	free(config->u.string); | ||||||
| 	config->u.string = new_string; | 	config->u.string = new_string; | ||||||
| 	return 0; | 	return 0; | ||||||
|  | @ -2091,7 +2083,6 @@ int snd_config_set_ascii(snd_config_t *config, const char *ascii) | ||||||
| 			char *ptr = strdup(ascii); | 			char *ptr = strdup(ascii); | ||||||
| 			if (ptr == NULL) | 			if (ptr == NULL) | ||||||
| 				return -ENOMEM; | 				return -ENOMEM; | ||||||
| 			if (config->u.string) |  | ||||||
| 			free(config->u.string); | 			free(config->u.string); | ||||||
| 			config->u.string = ptr; | 			config->u.string = ptr; | ||||||
| 		} | 		} | ||||||
|  | @ -2702,7 +2693,6 @@ static int snd_config_hooks_call(snd_config_t *root, snd_config_t *config, snd_c | ||||||
| 		if (err >= 0 && nroot) | 		if (err >= 0 && nroot) | ||||||
| 			err = snd_config_substitute(root, nroot); | 			err = snd_config_substitute(root, nroot); | ||||||
| 	} | 	} | ||||||
| 	if (buf) |  | ||||||
| 	free(buf); | 	free(buf); | ||||||
| 	if (err < 0) | 	if (err < 0) | ||||||
| 		return err; | 		return err; | ||||||
|  | @ -2844,10 +2834,9 @@ int snd_config_hook_load(snd_config_t *root, snd_config_t *config, snd_config_t | ||||||
| 	*dst = NULL; | 	*dst = NULL; | ||||||
| 	err = 0; | 	err = 0; | ||||||
|        _err: |        _err: | ||||||
| 	for (idx = 0; idx < fi_count; idx++) |  | ||||||
|        		if (fi[idx].name) |  | ||||||
|        			free(fi[idx].name); |  | ||||||
| 	if (fi) | 	if (fi) | ||||||
|  | 		for (idx = 0; idx < fi_count; idx++) | ||||||
|  | 			free(fi[idx].name); | ||||||
| 	free(fi); | 	free(fi); | ||||||
| 	snd_config_delete(n); | 	snd_config_delete(n); | ||||||
| 	return err; | 	return err; | ||||||
|  | @ -2905,7 +2894,6 @@ int snd_config_hook_load_for_all_cards(snd_config_t *root, snd_config_t *config, | ||||||
| 		      __err: | 		      __err: | ||||||
| 			if (private_data) | 			if (private_data) | ||||||
| 				snd_config_delete(private_data); | 				snd_config_delete(private_data); | ||||||
| 			if (fdriver) |  | ||||||
| 			free(fdriver); | 			free(fdriver); | ||||||
| 			if (err < 0) | 			if (err < 0) | ||||||
| 				return err; | 				return err; | ||||||
|  | @ -3108,7 +3096,6 @@ int snd_config_update_free(snd_config_update_t *update) | ||||||
| 	assert(update); | 	assert(update); | ||||||
| 	for (k = 0; k < update->count; k++) | 	for (k = 0; k < update->count; k++) | ||||||
| 		free(update->finfo[k].name); | 		free(update->finfo[k].name); | ||||||
| 	if (update->finfo) |  | ||||||
| 	free(update->finfo); | 	free(update->finfo); | ||||||
| 	free(update); | 	free(update); | ||||||
| 	return 0; | 	return 0; | ||||||
|  | @ -3500,7 +3487,6 @@ static int _snd_config_evaluate(snd_config_t *src, | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 	       _errbuf: | 	       _errbuf: | ||||||
| 		if (buf) |  | ||||||
| 		free(buf); | 		free(buf); | ||||||
| 		if (err < 0) | 		if (err < 0) | ||||||
| 			return err; | 			return err; | ||||||
|  |  | ||||||
|  | @ -295,7 +295,6 @@ int snd_func_getenv(snd_config_t **dst, snd_config_t *root, snd_config_t *src, | ||||||
| 		free(res); | 		free(res); | ||||||
| 	} | 	} | ||||||
|       __error: |       __error: | ||||||
|       	if (def) |  | ||||||
| 	free(def); | 	free(def); | ||||||
| 	return err; | 	return err; | ||||||
| } | } | ||||||
|  | @ -419,7 +418,6 @@ int snd_func_concat(snd_config_t **dst, snd_config_t *root, snd_config_t *src, | ||||||
| 				tmp = realloc(res, len + len1 + 1); | 				tmp = realloc(res, len + len1 + 1); | ||||||
| 				if (tmp == NULL) { | 				if (tmp == NULL) { | ||||||
| 					free(ptr); | 					free(ptr); | ||||||
| 					if (res) |  | ||||||
| 					free(res); | 					free(res); | ||||||
| 					err = -ENOMEM; | 					err = -ENOMEM; | ||||||
| 					goto __error; | 					goto __error; | ||||||
|  |  | ||||||
|  | @ -94,7 +94,6 @@ int snd_ctl_close(snd_ctl_t *ctl) | ||||||
| 		snd_async_del_handler(h); | 		snd_async_del_handler(h); | ||||||
| 	} | 	} | ||||||
| 	err = ctl->ops->close(ctl); | 	err = ctl->ops->close(ctl); | ||||||
| 	if (ctl->name) |  | ||||||
| 	free(ctl->name); | 	free(ctl->name); | ||||||
| 	if (ctl->dl_handle) | 	if (ctl->dl_handle) | ||||||
| 		snd_dlclose(ctl->dl_handle); | 		snd_dlclose(ctl->dl_handle); | ||||||
|  | @ -925,7 +924,6 @@ const char *snd_ctl_event_type_name(snd_ctl_event_type_t type) | ||||||
|  */ |  */ | ||||||
| int snd_ctl_elem_list_alloc_space(snd_ctl_elem_list_t *obj, unsigned int entries) | int snd_ctl_elem_list_alloc_space(snd_ctl_elem_list_t *obj, unsigned int entries) | ||||||
| { | { | ||||||
| 	if (obj->pids) |  | ||||||
| 	free(obj->pids); | 	free(obj->pids); | ||||||
| 	obj->pids = calloc(entries, sizeof(*obj->pids)); | 	obj->pids = calloc(entries, sizeof(*obj->pids)); | ||||||
| 	if (!obj->pids) { | 	if (!obj->pids) { | ||||||
|  |  | ||||||
|  | @ -555,7 +555,6 @@ int snd_ctl_shm_open(snd_ctl_t **handlep, const char *name, const char *sockname | ||||||
| 	close(sock); | 	close(sock); | ||||||
| 	if (ctrl) | 	if (ctrl) | ||||||
| 		shmdt(ctrl); | 		shmdt(ctrl); | ||||||
| 	if (shm) |  | ||||||
| 	free(shm); | 	free(shm); | ||||||
| 	return result; | 	return result; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -606,7 +606,6 @@ int snd_hctl_load(snd_hctl_t *hctl) | ||||||
| 	} | 	} | ||||||
| 	err = snd_ctl_subscribe_events(hctl->ctl, 1); | 	err = snd_ctl_subscribe_events(hctl->ctl, 1); | ||||||
|  _end: |  _end: | ||||||
| 	if (list.pids) |  | ||||||
| 	free(list.pids); | 	free(list.pids); | ||||||
| 	return err; | 	return err; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -207,7 +207,6 @@ int snd_hwdep_close(snd_hwdep_t *hwdep) | ||||||
| 	int err; | 	int err; | ||||||
|   	assert(hwdep); |   	assert(hwdep); | ||||||
| 	err = hwdep->ops->close(hwdep); | 	err = hwdep->ops->close(hwdep); | ||||||
| 	if (hwdep->name) |  | ||||||
| 	free(hwdep->name); | 	free(hwdep->name); | ||||||
| 	free(hwdep); | 	free(hwdep); | ||||||
| 	return err; | 	return err; | ||||||
|  |  | ||||||
|  | @ -382,11 +382,8 @@ int snd_instr_iwffff_close(snd_iwffff_handle_t *handle) | ||||||
| { | { | ||||||
| 	if (handle == NULL) | 	if (handle == NULL) | ||||||
| 		return -EINVAL; | 		return -EINVAL; | ||||||
| 	if (handle->dat_filename) |  | ||||||
| 	free(handle->dat_filename); | 	free(handle->dat_filename); | ||||||
| 	if (handle->fff_filename) |  | ||||||
| 	free(handle->fff_filename); | 	free(handle->fff_filename); | ||||||
| 	if (handle->fff_data) |  | ||||||
| 	free(handle->fff_data); | 	free(handle->fff_data); | ||||||
| 	free(handle); | 	free(handle); | ||||||
| 	return 0; | 	return 0; | ||||||
|  | @ -396,7 +393,6 @@ static void free_wave(iwffff_wave_t *wave) | ||||||
| { | { | ||||||
| 	if (wave == NULL) | 	if (wave == NULL) | ||||||
| 		return; | 		return; | ||||||
| 	if (wave->address.ptr != NULL) |  | ||||||
| 	free(wave->address.ptr); | 	free(wave->address.ptr); | ||||||
| 	free(wave); | 	free(wave); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -607,10 +607,8 @@ int snd_mixer_close(snd_mixer_t *mixer) | ||||||
| 	} | 	} | ||||||
| 	assert(list_empty(&mixer->elems)); | 	assert(list_empty(&mixer->elems)); | ||||||
| 	assert(mixer->count == 0); | 	assert(mixer->count == 0); | ||||||
| 	if (mixer->pelems) { |  | ||||||
| 	free(mixer->pelems); | 	free(mixer->pelems); | ||||||
| 	mixer->pelems = NULL; | 	mixer->pelems = NULL; | ||||||
| 	} |  | ||||||
| 	while (!list_empty(&mixer->slaves)) { | 	while (!list_empty(&mixer->slaves)) { | ||||||
| 		int err; | 		int err; | ||||||
| 		snd_mixer_slave_t *s; | 		snd_mixer_slave_t *s; | ||||||
|  |  | ||||||
|  | @ -182,7 +182,6 @@ static void private_free(snd_mixer_class_t *class) | ||||||
| 		snd_hctl_close(priv->hctl); | 		snd_hctl_close(priv->hctl); | ||||||
| 	} else if (priv->ctl) | 	} else if (priv->ctl) | ||||||
| 		snd_ctl_close(priv->ctl); | 		snd_ctl_close(priv->ctl); | ||||||
| 	if (priv->device) |  | ||||||
| 	free(priv->device); | 	free(priv->device); | ||||||
| 	free(priv); | 	free(priv); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -1388,7 +1388,6 @@ int snd_mixer_simple_none_register(snd_mixer_t *mixer, | ||||||
| 	snd_mixer_class_set_compare(class, snd_mixer_selem_compare); | 	snd_mixer_class_set_compare(class, snd_mixer_selem_compare); | ||||||
| 	err = snd_mixer_class_register(class, mixer); | 	err = snd_mixer_class_register(class, mixer); | ||||||
| 	if (err < 0) { | 	if (err < 0) { | ||||||
| 		if (class) |  | ||||||
| 		free(class); | 		free(class); | ||||||
| 		return err; | 		return err; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | @ -105,16 +105,13 @@ static int names_parse(snd_config_t *top, const char *iface, snd_devname_t **lis | ||||||
| 			} | 			} | ||||||
| 			last = dn; | 			last = dn; | ||||||
| 		} else { | 		} else { | ||||||
| 			if (comment != NULL) |  | ||||||
| 			free(comment); | 			free(comment); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 	return 0; | 	return 0; | ||||||
| 
 | 
 | ||||||
|        _err: |        _err: | ||||||
|       	if (name) |  | ||||||
| 	free(name); | 	free(name); | ||||||
|       	if (comment) |  | ||||||
| 	free(comment); | 	free(comment); | ||||||
|       	return err; |       	return err; | ||||||
| } | } | ||||||
|  | @ -189,9 +186,7 @@ void snd_names_list_free(snd_devname_t *list) | ||||||
| 	 | 	 | ||||||
| 	while (list != NULL) { | 	while (list != NULL) { | ||||||
| 		next = list->next; | 		next = list->next; | ||||||
| 		if (list->name) |  | ||||||
| 		free(list->name); | 		free(list->name); | ||||||
| 		if (list->comment) |  | ||||||
| 		free(list->comment); | 		free(list->comment); | ||||||
| 		free(list); | 		free(list); | ||||||
| 		list = next; | 		list = next; | ||||||
|  |  | ||||||
|  | @ -2102,9 +2102,7 @@ static int snd_pcm_open_conf(snd_pcm_t **pcmp, const char *name, | ||||||
| 	} | 	} | ||||||
| 	if (type_conf) | 	if (type_conf) | ||||||
| 		snd_config_delete(type_conf); | 		snd_config_delete(type_conf); | ||||||
| 	if (buf) |  | ||||||
| 	free(buf); | 	free(buf); | ||||||
| 	if (buf1) |  | ||||||
| 	free(buf1); | 	free(buf1); | ||||||
| 	return err; | 	return err; | ||||||
| } | } | ||||||
|  | @ -2187,11 +2185,8 @@ int snd_pcm_new(snd_pcm_t **pcmp, snd_pcm_type_t type, const char *name, | ||||||
| int snd_pcm_free(snd_pcm_t *pcm) | int snd_pcm_free(snd_pcm_t *pcm) | ||||||
| { | { | ||||||
| 	assert(pcm); | 	assert(pcm); | ||||||
| 	if (pcm->name) |  | ||||||
| 	free(pcm->name); | 	free(pcm->name); | ||||||
| 	if (pcm->hw.link_dst) |  | ||||||
| 	free(pcm->hw.link_dst); | 	free(pcm->hw.link_dst); | ||||||
| 	if (pcm->appl.link_dst) |  | ||||||
| 	free(pcm->appl.link_dst); | 	free(pcm->appl.link_dst); | ||||||
| 	if (pcm->dl_handle) | 	if (pcm->dl_handle) | ||||||
| 		snd_dlclose(pcm->dl_handle); | 		snd_dlclose(pcm->dl_handle); | ||||||
|  |  | ||||||
|  | @ -449,10 +449,8 @@ static int snd_pcm_adpcm_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params) | ||||||
| static int snd_pcm_adpcm_hw_free(snd_pcm_t *pcm) | static int snd_pcm_adpcm_hw_free(snd_pcm_t *pcm) | ||||||
| { | { | ||||||
| 	snd_pcm_adpcm_t *adpcm = pcm->private_data; | 	snd_pcm_adpcm_t *adpcm = pcm->private_data; | ||||||
| 	if (adpcm->states) { |  | ||||||
| 	free(adpcm->states); | 	free(adpcm->states); | ||||||
| 		adpcm->states = 0; | 	adpcm->states = NULL; | ||||||
| 	} |  | ||||||
| 	return snd_pcm_hw_free(adpcm->plug.gen.slave); | 	return snd_pcm_hw_free(adpcm->plug.gen.slave); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -639,7 +639,6 @@ static int snd_pcm_dmix_close(snd_pcm_t *pcm) | ||||||
|  	shm_sum_discard(dmix); |  	shm_sum_discard(dmix); | ||||||
| 	snd_pcm_direct_shm_discard(dmix); | 	snd_pcm_direct_shm_discard(dmix); | ||||||
| 	snd_pcm_direct_semaphore_up(dmix, DIRECT_IPC_SEM_CLIENT); | 	snd_pcm_direct_semaphore_up(dmix, DIRECT_IPC_SEM_CLIENT); | ||||||
| 	if (dmix->bindings) |  | ||||||
| 	free(dmix->bindings); | 	free(dmix->bindings); | ||||||
| 	pcm->private_data = NULL; | 	pcm->private_data = NULL; | ||||||
| 	free(dmix); | 	free(dmix); | ||||||
|  | @ -941,7 +940,6 @@ int snd_pcm_dmix_open(snd_pcm_t **pcmp, const char *name, | ||||||
| 		snd_pcm_direct_semaphore_up(dmix, DIRECT_IPC_SEM_CLIENT); | 		snd_pcm_direct_semaphore_up(dmix, DIRECT_IPC_SEM_CLIENT); | ||||||
|  _err_nosem: |  _err_nosem: | ||||||
| 	if (dmix) { | 	if (dmix) { | ||||||
| 		if (dmix->bindings) |  | ||||||
| 		free(dmix->bindings); | 		free(dmix->bindings); | ||||||
| 		free(dmix); | 		free(dmix); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | @ -466,7 +466,6 @@ static int snd_pcm_dshare_close(snd_pcm_t *pcm) | ||||||
|  		snd_pcm_direct_client_discard(dshare); |  		snd_pcm_direct_client_discard(dshare); | ||||||
| 	snd_pcm_direct_shm_discard(dshare); | 	snd_pcm_direct_shm_discard(dshare); | ||||||
| 	snd_pcm_direct_semaphore_up(dshare, DIRECT_IPC_SEM_CLIENT); | 	snd_pcm_direct_semaphore_up(dshare, DIRECT_IPC_SEM_CLIENT); | ||||||
| 	if (dshare->bindings) |  | ||||||
| 	free(dshare->bindings); | 	free(dshare->bindings); | ||||||
| 	pcm->private_data = NULL; | 	pcm->private_data = NULL; | ||||||
| 	free(dshare); | 	free(dshare); | ||||||
|  | @ -763,7 +762,6 @@ int snd_pcm_dshare_open(snd_pcm_t **pcmp, const char *name, | ||||||
| 		snd_pcm_direct_semaphore_up(dshare, DIRECT_IPC_SEM_CLIENT); | 		snd_pcm_direct_semaphore_up(dshare, DIRECT_IPC_SEM_CLIENT); | ||||||
|  _err_nosem: |  _err_nosem: | ||||||
| 	if (dshare) { | 	if (dshare) { | ||||||
| 		if (dshare->bindings) |  | ||||||
| 		free(dshare->bindings); | 		free(dshare->bindings); | ||||||
| 		free(dshare); | 		free(dshare); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | @ -362,7 +362,6 @@ static int snd_pcm_dsnoop_close(snd_pcm_t *pcm) | ||||||
|  		snd_pcm_direct_client_discard(dsnoop); |  		snd_pcm_direct_client_discard(dsnoop); | ||||||
| 	snd_pcm_direct_shm_discard(dsnoop); | 	snd_pcm_direct_shm_discard(dsnoop); | ||||||
| 	snd_pcm_direct_semaphore_up(dsnoop, DIRECT_IPC_SEM_CLIENT); | 	snd_pcm_direct_semaphore_up(dsnoop, DIRECT_IPC_SEM_CLIENT); | ||||||
| 	if (dsnoop->bindings) |  | ||||||
| 	free(dsnoop->bindings); | 	free(dsnoop->bindings); | ||||||
| 	pcm->private_data = NULL; | 	pcm->private_data = NULL; | ||||||
| 	free(dsnoop); | 	free(dsnoop); | ||||||
|  | @ -636,7 +635,6 @@ int snd_pcm_dsnoop_open(snd_pcm_t **pcmp, const char *name, | ||||||
| 		snd_pcm_direct_semaphore_up(dsnoop, DIRECT_IPC_SEM_CLIENT); | 		snd_pcm_direct_semaphore_up(dsnoop, DIRECT_IPC_SEM_CLIENT); | ||||||
|  _err_nosem: |  _err_nosem: | ||||||
| 	if (dsnoop) { | 	if (dsnoop) { | ||||||
| 		if (dsnoop->bindings) |  | ||||||
| 		free(dsnoop->bindings); | 		free(dsnoop->bindings); | ||||||
| 		free(dsnoop); | 		free(dsnoop); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | @ -263,13 +263,10 @@ static snd_pcm_sframes_t snd_pcm_file_mmap_commit(snd_pcm_t *pcm, | ||||||
| static int snd_pcm_file_hw_free(snd_pcm_t *pcm) | static int snd_pcm_file_hw_free(snd_pcm_t *pcm) | ||||||
| { | { | ||||||
| 	snd_pcm_file_t *file = pcm->private_data; | 	snd_pcm_file_t *file = pcm->private_data; | ||||||
| 	if (file->wbuf) { |  | ||||||
| 	free(file->wbuf); | 	free(file->wbuf); | ||||||
| 		if (file->wbuf_areas) |  | ||||||
| 	free(file->wbuf_areas); | 	free(file->wbuf_areas); | ||||||
| 		file->wbuf = 0; | 	file->wbuf = NULL; | ||||||
| 		file->wbuf_areas = 0; | 	file->wbuf_areas = NULL; | ||||||
| 	} |  | ||||||
| 	return snd_pcm_hw_free(file->gen.slave); | 	return snd_pcm_hw_free(file->gen.slave); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -418,7 +415,6 @@ int snd_pcm_file_open(snd_pcm_t **pcmp, const char *name, | ||||||
| 
 | 
 | ||||||
| 	err = snd_pcm_new(&pcm, SND_PCM_TYPE_FILE, name, slave->stream, slave->mode); | 	err = snd_pcm_new(&pcm, SND_PCM_TYPE_FILE, name, slave->stream, slave->mode); | ||||||
| 	if (err < 0) { | 	if (err < 0) { | ||||||
| 		if (fname) |  | ||||||
| 		free(file->fname); | 		free(file->fname); | ||||||
| 		free(file); | 		free(file); | ||||||
| 		return err; | 		return err; | ||||||
|  |  | ||||||
|  | @ -843,10 +843,8 @@ static int snd_pcm_hw_munmap_status(snd_pcm_t *pcm) | ||||||
| 	snd_pcm_hw_t *hw = pcm->private_data; | 	snd_pcm_hw_t *hw = pcm->private_data; | ||||||
| 	int err; | 	int err; | ||||||
| 	if (hw->sync_ptr_ioctl) { | 	if (hw->sync_ptr_ioctl) { | ||||||
| 		if (hw->sync_ptr) { |  | ||||||
| 		free(hw->sync_ptr); | 		free(hw->sync_ptr); | ||||||
| 		hw->sync_ptr = NULL; | 		hw->sync_ptr = NULL; | ||||||
| 		} |  | ||||||
| 	} else { | 	} else { | ||||||
| 		if (munmap((void*)hw->mmap_status, page_align(sizeof(*hw->mmap_status))) < 0) { | 		if (munmap((void*)hw->mmap_status, page_align(sizeof(*hw->mmap_status))) < 0) { | ||||||
| 			err = -errno; | 			err = -errno; | ||||||
|  | @ -862,10 +860,8 @@ static int snd_pcm_hw_munmap_control(snd_pcm_t *pcm) | ||||||
| 	snd_pcm_hw_t *hw = pcm->private_data; | 	snd_pcm_hw_t *hw = pcm->private_data; | ||||||
| 	int err; | 	int err; | ||||||
| 	if (hw->sync_ptr_ioctl) { | 	if (hw->sync_ptr_ioctl) { | ||||||
| 		if (hw->sync_ptr) { |  | ||||||
| 		free(hw->sync_ptr); | 		free(hw->sync_ptr); | ||||||
| 		hw->sync_ptr = NULL; | 		hw->sync_ptr = NULL; | ||||||
| 		} |  | ||||||
| 	} else { | 	} else { | ||||||
| 		if (munmap(hw->mmap_control, page_align(sizeof(*hw->mmap_control))) < 0) { | 		if (munmap(hw->mmap_control, page_align(sizeof(*hw->mmap_control))) < 0) { | ||||||
| 			err = -errno; | 			err = -errno; | ||||||
|  |  | ||||||
|  | @ -175,9 +175,7 @@ static int snd_pcm_ladspa_find_port_idx(unsigned int *res, | ||||||
| 
 | 
 | ||||||
| static void snd_pcm_ladspa_free_io(snd_pcm_ladspa_plugin_io_t *io) | static void snd_pcm_ladspa_free_io(snd_pcm_ladspa_plugin_io_t *io) | ||||||
| { | { | ||||||
|         if (io->controls) |  | ||||||
| 	free(io->controls); | 	free(io->controls); | ||||||
|         if (io->controls_initialized) |  | ||||||
| 	free(io->controls_initialized); | 	free(io->controls_initialized); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -189,7 +187,6 @@ static void snd_pcm_ladspa_free_plugins(struct list_head *plugins) | ||||||
|                 snd_pcm_ladspa_free_io(&plugin->output); |                 snd_pcm_ladspa_free_io(&plugin->output); | ||||||
| 		if (plugin->dl_handle) | 		if (plugin->dl_handle) | ||||||
| 			dlclose(plugin->dl_handle); | 			dlclose(plugin->dl_handle); | ||||||
| 		if (plugin->filename) |  | ||||||
| 		free(plugin->filename); | 		free(plugin->filename); | ||||||
| 		list_del(&plugin->list); | 		list_del(&plugin->list); | ||||||
| 		free(plugin); | 		free(plugin); | ||||||
|  | @ -203,7 +200,6 @@ static void snd_pcm_ladspa_free(snd_pcm_ladspa_t *ladspa) | ||||||
| 	snd_pcm_ladspa_free_plugins(&ladspa->pplugins); | 	snd_pcm_ladspa_free_plugins(&ladspa->pplugins); | ||||||
| 	snd_pcm_ladspa_free_plugins(&ladspa->cplugins); | 	snd_pcm_ladspa_free_plugins(&ladspa->cplugins); | ||||||
| 	for (idx = 0; idx < 2; idx++) { | 	for (idx = 0; idx < 2; idx++) { | ||||||
|         	if (ladspa->zero[idx]) |  | ||||||
| 		free(ladspa->zero[idx]); | 		free(ladspa->zero[idx]); | ||||||
|                 ladspa->zero[idx] = NULL; |                 ladspa->zero[idx] = NULL; | ||||||
|         } |         } | ||||||
|  | @ -317,9 +313,7 @@ static int snd_pcm_ladspa_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params | ||||||
| 
 | 
 | ||||||
| static void snd_pcm_ladspa_free_eps(snd_pcm_ladspa_eps_t *eps) | static void snd_pcm_ladspa_free_eps(snd_pcm_ladspa_eps_t *eps) | ||||||
| { | { | ||||||
| 	if (eps->channels.array) |  | ||||||
| 	free(eps->channels.array); | 	free(eps->channels.array); | ||||||
|         if (eps->ports.array) |  | ||||||
| 	free(eps->ports.array); | 	free(eps->ports.array); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -340,13 +334,11 @@ static void snd_pcm_ladspa_free_instances(snd_pcm_t *pcm, snd_pcm_ladspa_t *lads | ||||||
| 					plugin->desc->cleanup(instance->handle); | 					plugin->desc->cleanup(instance->handle); | ||||||
| 				if (instance->input.m_data) { | 				if (instance->input.m_data) { | ||||||
| 				        for (idx = 0; idx < instance->input.channels.size; idx++) | 				        for (idx = 0; idx < instance->input.channels.size; idx++) | ||||||
| 				                if (instance->input.m_data[idx]) |  | ||||||
| 						free(instance->input.m_data[idx]); | 						free(instance->input.m_data[idx]); | ||||||
| 					free(instance->input.m_data); | 					free(instance->input.m_data); | ||||||
|                                 } |                                 } | ||||||
| 				if (instance->output.m_data) { | 				if (instance->output.m_data) { | ||||||
| 				        for (idx = 0; idx < instance->output.channels.size; idx++) | 				        for (idx = 0; idx < instance->output.channels.size; idx++) | ||||||
| 				                if (instance->output.m_data[idx]) |  | ||||||
| 						free(instance->output.m_data[idx]); | 						free(instance->output.m_data[idx]); | ||||||
| 					free(instance->output.m_data); | 					free(instance->output.m_data); | ||||||
|                                 } |                                 } | ||||||
|  | @ -789,10 +781,8 @@ static int snd_pcm_ladspa_allocate_memory(snd_pcm_t *pcm, snd_pcm_ladspa_t *lads | ||||||
|                         for (idx = 0; idx < instance->output.channels.size; idx++) { |                         for (idx = 0; idx < instance->output.channels.size; idx++) { | ||||||
|         			chn = instance->output.channels.array[idx]; |         			chn = instance->output.channels.array[idx]; | ||||||
|                                 if (instance->output.data[idx] == pchannels[chn]) { |                                 if (instance->output.data[idx] == pchannels[chn]) { | ||||||
|                                         if (instance->output.m_data[idx]) { |  | ||||||
| 					free(instance->output.m_data[idx]); | 					free(instance->output.m_data[idx]); | ||||||
| 					instance->output.m_data[idx] = NULL; | 					instance->output.m_data[idx] = NULL; | ||||||
|                                         } |  | ||||||
|                                         if (chn < ochannels) { |                                         if (chn < ochannels) { | ||||||
|                                                 instance->output.data[idx] = NULL; |                                                 instance->output.data[idx] = NULL; | ||||||
|                                         } else { |                                         } else { | ||||||
|  |  | ||||||
|  | @ -153,8 +153,7 @@ static int snd_pcm_meter_update_scope(snd_pcm_t *pcm) | ||||||
| 
 | 
 | ||||||
| static int snd_pcm_scope_remove(snd_pcm_scope_t *scope) | static int snd_pcm_scope_remove(snd_pcm_scope_t *scope) | ||||||
| { | { | ||||||
| 	if (scope->name) | 	free(scope->name); | ||||||
| 		free((void *)scope->name); |  | ||||||
| 	scope->ops->close(scope); | 	scope->ops->close(scope); | ||||||
| 	list_del(&scope->list); | 	list_del(&scope->list); | ||||||
| 	free(scope); | 	free(scope); | ||||||
|  | @ -480,12 +479,10 @@ static int snd_pcm_meter_hw_free(snd_pcm_t *pcm) | ||||||
| 	pthread_mutex_unlock(&meter->running_mutex); | 	pthread_mutex_unlock(&meter->running_mutex); | ||||||
| 	err = pthread_join(meter->thread, 0); | 	err = pthread_join(meter->thread, 0); | ||||||
| 	assert(err == 0); | 	assert(err == 0); | ||||||
| 	if (meter->buf) { |  | ||||||
| 	free(meter->buf); | 	free(meter->buf); | ||||||
| 	free(meter->buf_areas); | 	free(meter->buf_areas); | ||||||
| 		meter->buf = 0; | 	meter->buf = NULL; | ||||||
| 		meter->buf_areas = 0; | 	meter->buf_areas = NULL; | ||||||
| 	} |  | ||||||
| 	return snd_pcm_hw_free(meter->gen.slave); | 	return snd_pcm_hw_free(meter->gen.slave); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -1028,14 +1025,12 @@ static int s16_enable(snd_pcm_scope_t *scope) | ||||||
| 	} | 	} | ||||||
| 	s16->buf = malloc(meter->buf_size * 2 * spcm->channels); | 	s16->buf = malloc(meter->buf_size * 2 * spcm->channels); | ||||||
| 	if (!s16->buf) { | 	if (!s16->buf) { | ||||||
| 		if (s16->adpcm_states) |  | ||||||
| 		free(s16->adpcm_states); | 		free(s16->adpcm_states); | ||||||
| 		return -ENOMEM; | 		return -ENOMEM; | ||||||
| 	} | 	} | ||||||
| 	a = calloc(spcm->channels, sizeof(*a)); | 	a = calloc(spcm->channels, sizeof(*a)); | ||||||
| 	if (!a) { | 	if (!a) { | ||||||
| 		free(s16->buf); | 		free(s16->buf); | ||||||
| 		if (s16->adpcm_states) |  | ||||||
| 		free(s16->adpcm_states); | 		free(s16->adpcm_states); | ||||||
| 		return -ENOMEM; | 		return -ENOMEM; | ||||||
| 	} | 	} | ||||||
|  | @ -1051,10 +1046,8 @@ static int s16_enable(snd_pcm_scope_t *scope) | ||||||
| static void s16_disable(snd_pcm_scope_t *scope) | static void s16_disable(snd_pcm_scope_t *scope) | ||||||
| { | { | ||||||
| 	snd_pcm_scope_s16_t *s16 = scope->private_data; | 	snd_pcm_scope_s16_t *s16 = scope->private_data; | ||||||
| 	if (s16->adpcm_states) { |  | ||||||
| 	free(s16->adpcm_states); | 	free(s16->adpcm_states); | ||||||
| 	s16->adpcm_states = NULL; | 	s16->adpcm_states = NULL; | ||||||
| 	} |  | ||||||
| 	free(s16->buf); | 	free(s16->buf); | ||||||
| 	s16->buf = NULL; | 	s16->buf = NULL; | ||||||
| 	free(s16->buf_areas); | 	free(s16->buf_areas); | ||||||
|  |  | ||||||
|  | @ -790,7 +790,7 @@ int snd_pcm_multi_open(snd_pcm_t **pcmp, const char *name, | ||||||
| 	multi->channels = calloc(channels_count, sizeof(*multi->channels)); | 	multi->channels = calloc(channels_count, sizeof(*multi->channels)); | ||||||
| 	if (!multi->channels) { | 	if (!multi->channels) { | ||||||
| 		free(multi->slaves); | 		free(multi->slaves); | ||||||
| 		free(multi->channels); | 		free(multi); | ||||||
| 		return -ENOMEM; | 		return -ENOMEM; | ||||||
| 	} | 	} | ||||||
| 	for (i = 0; i < slaves_count; ++i) { | 	for (i = 0; i < slaves_count; ++i) { | ||||||
|  | @ -1130,15 +1130,10 @@ _free: | ||||||
| 		} | 		} | ||||||
| 		free(slaves_conf); | 		free(slaves_conf); | ||||||
| 	} | 	} | ||||||
| 	if (slaves_pcm) |  | ||||||
| 	free(slaves_pcm); | 	free(slaves_pcm); | ||||||
| 	if (slaves_channels) |  | ||||||
| 	free(slaves_channels); | 	free(slaves_channels); | ||||||
| 	if (channels_sidx) |  | ||||||
| 	free(channels_sidx); | 	free(channels_sidx); | ||||||
| 	if (channels_schannel) |  | ||||||
| 	free(channels_schannel); | 	free(channels_schannel); | ||||||
| 	if (slaves_id) |  | ||||||
| 	free(slaves_id); | 	free(slaves_id); | ||||||
| 	return err; | 	return err; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -62,7 +62,6 @@ static int snd_pcm_plug_close(snd_pcm_t *pcm) | ||||||
| { | { | ||||||
| 	snd_pcm_plug_t *plug = pcm->private_data; | 	snd_pcm_plug_t *plug = pcm->private_data; | ||||||
| 	int err, result = 0; | 	int err, result = 0; | ||||||
| 	if (plug->ttable) |  | ||||||
| 	free(plug->ttable); | 	free(plug->ttable); | ||||||
| 	assert(plug->gen.slave == plug->req_slave); | 	assert(plug->gen.slave == plug->req_slave); | ||||||
| 	if (plug->gen.close_slave) { | 	if (plug->gen.close_slave) { | ||||||
|  |  | ||||||
|  | @ -513,7 +513,6 @@ static int snd_pcm_route_close(snd_pcm_t *pcm) | ||||||
| 
 | 
 | ||||||
| 	if (params->dsts) { | 	if (params->dsts) { | ||||||
| 		for (dst_channel = 0; dst_channel < params->ndsts; ++dst_channel) { | 		for (dst_channel = 0; dst_channel < params->ndsts; ++dst_channel) { | ||||||
| 			if (params->dsts[dst_channel].srcs != NULL) |  | ||||||
| 			free(params->dsts[dst_channel].srcs); | 			free(params->dsts[dst_channel].srcs); | ||||||
| 		} | 		} | ||||||
| 		free(params->dsts); | 		free(params->dsts); | ||||||
|  |  | ||||||
|  | @ -1689,9 +1689,7 @@ int _snd_pcm_share_open(snd_pcm_t **pcmp, const char *name, | ||||||
| 				 speriod_time, sbuffer_time, | 				 speriod_time, sbuffer_time, | ||||||
| 				 channels, channels_map, stream, mode); | 				 channels, channels_map, stream, mode); | ||||||
| _free: | _free: | ||||||
| 	if (channels_map) |  | ||||||
| 	free(channels_map); | 	free(channels_map); | ||||||
| 	if (sname) |  | ||||||
| 	free((char *)sname); | 	free((char *)sname); | ||||||
| 	return err; | 	return err; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -773,7 +773,6 @@ int snd_pcm_shm_open(snd_pcm_t **pcmp, const char *name, | ||||||
| 	close(sock); | 	close(sock); | ||||||
| 	if (ctrl) | 	if (ctrl) | ||||||
| 		shmdt(ctrl); | 		shmdt(ctrl); | ||||||
| 	if (shm) |  | ||||||
| 	free(shm); | 	free(shm); | ||||||
| 	return result; | 	return result; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -342,7 +342,6 @@ int snd_rawmidi_close(snd_rawmidi_t *rawmidi) | ||||||
| 	int err; | 	int err; | ||||||
|   	assert(rawmidi); |   	assert(rawmidi); | ||||||
| 	err = rawmidi->ops->close(rawmidi); | 	err = rawmidi->ops->close(rawmidi); | ||||||
| 	if (rawmidi->name) |  | ||||||
| 	free(rawmidi->name); | 	free(rawmidi->name); | ||||||
| 	if (rawmidi->dl_handle) | 	if (rawmidi->dl_handle) | ||||||
| 		snd_dlclose(rawmidi->dl_handle); | 		snd_dlclose(rawmidi->dl_handle); | ||||||
|  |  | ||||||
|  | @ -316,11 +316,10 @@ int snd_rawmidi_hw_open(snd_rawmidi_t **inputp, snd_rawmidi_t **outputp, | ||||||
| 
 | 
 | ||||||
|  _nomem: |  _nomem: | ||||||
| 	close(fd); | 	close(fd); | ||||||
| 	if (hw) |  | ||||||
| 	free(hw); | 	free(hw); | ||||||
| 	if (inputp && *inputp) | 	if (inputp) | ||||||
| 		free(*inputp); | 		free(*inputp); | ||||||
| 	if (outputp && *outputp) | 	if (outputp) | ||||||
| 		free(*outputp); | 		free(*outputp); | ||||||
| 	return -ENOMEM; | 	return -ENOMEM; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -385,11 +385,10 @@ int snd_rawmidi_virtual_open(snd_rawmidi_t **inputp, snd_rawmidi_t **outputp, | ||||||
| 		snd_seq_close(seq_handle); | 		snd_seq_close(seq_handle); | ||||||
| 	if (virt->midi_event) | 	if (virt->midi_event) | ||||||
| 		snd_midi_event_free(virt->midi_event); | 		snd_midi_event_free(virt->midi_event); | ||||||
| 	if (virt) |  | ||||||
| 	free(virt); | 	free(virt); | ||||||
| 	if (inputp && *inputp) | 	if (inputp) | ||||||
| 		free(*inputp); | 		free(*inputp); | ||||||
| 	if (outputp && *outputp) | 	if (outputp) | ||||||
| 		free(*outputp); | 		free(*outputp); | ||||||
| 	return err; | 	return err; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -1029,13 +1029,9 @@ int snd_seq_close(snd_seq_t *seq) | ||||||
| 	int err; | 	int err; | ||||||
| 	assert(seq); | 	assert(seq); | ||||||
| 	err = seq->ops->close(seq); | 	err = seq->ops->close(seq); | ||||||
| 	if (seq->obuf) |  | ||||||
| 	free(seq->obuf); | 	free(seq->obuf); | ||||||
| 	if (seq->ibuf) |  | ||||||
| 	free(seq->ibuf); | 	free(seq->ibuf); | ||||||
| 	if (seq->tmpbuf) |  | ||||||
| 	free(seq->tmpbuf); | 	free(seq->tmpbuf); | ||||||
| 	if (seq->name) |  | ||||||
| 	free(seq->name); | 	free(seq->name); | ||||||
| 	free(seq); | 	free(seq); | ||||||
| 	return err; | 	return err; | ||||||
|  |  | ||||||
|  | @ -167,7 +167,6 @@ int snd_midi_event_new(size_t bufsize, snd_midi_event_t **rdev) | ||||||
| void snd_midi_event_free(snd_midi_event_t *dev) | void snd_midi_event_free(snd_midi_event_t *dev) | ||||||
| { | { | ||||||
| 	if (dev != NULL) { | 	if (dev != NULL) { | ||||||
| 		if (dev->buf) |  | ||||||
| 		free(dev->buf); | 		free(dev->buf); | ||||||
| 		free(dev); | 		free(dev); | ||||||
| 	} | 	} | ||||||
|  | @ -253,7 +252,6 @@ int snd_midi_event_resize_buffer(snd_midi_event_t *dev, size_t bufsize) | ||||||
| 	dev->buf = new_buf; | 	dev->buf = new_buf; | ||||||
| 	dev->bufsize = bufsize; | 	dev->bufsize = bufsize; | ||||||
| 	reset_encode(dev); | 	reset_encode(dev); | ||||||
| 	if (old_buf) |  | ||||||
| 	free(old_buf); | 	free(old_buf); | ||||||
| 	return 0; | 	return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -243,7 +243,6 @@ int snd_timer_close(snd_timer_t *timer) | ||||||
| 		snd_async_del_handler(h); | 		snd_async_del_handler(h); | ||||||
| 	} | 	} | ||||||
| 	err = timer->ops->close(timer); | 	err = timer->ops->close(timer); | ||||||
| 	if (timer->name) |  | ||||||
| 	free(timer->name); | 	free(timer->name); | ||||||
| 	free(timer); | 	free(timer); | ||||||
| 	return err; | 	return err; | ||||||
|  |  | ||||||
|  | @ -197,7 +197,6 @@ int snd_timer_query_close(snd_timer_query_t *timer) | ||||||
| 	int err; | 	int err; | ||||||
|   	assert(timer); |   	assert(timer); | ||||||
| 	err = timer->ops->close(timer); | 	err = timer->ops->close(timer); | ||||||
| 	if (timer->name) |  | ||||||
| 	free(timer->name); | 	free(timer->name); | ||||||
| 	free(timer); | 	free(timer); | ||||||
| 	return err; | 	return err; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Clemens Ladisch
						Clemens Ladisch