add: pkg_free(fn);
context: struct flat_con* flat_new_connection(struct flat_id* id){	char* fn;	struct flat_con* res;	if (!id) {		LOG(L_ERR, "flat_new_connection: Invalid parameter value\n");		return 0;	}	res = (struct flat_con*)pkg_malloc(sizeof(struct flat_con));	if (!res) {		LOG(L_ERR, "flat_new_connection: No memory left\n");		return 0;	}	memset(res, 0, sizeof(struct flat_con));	res->ref = 1;		res->id = id;	fn = get_name(id);	res->file = fopen(fn, "a");	if (!res->file) {		LOG(L_ERR, "flat_new_connection: %s\n", strerror(errno));		pkg_free(res);		return 0;	}		return res;}