rem: config_filename = shm_malloc( sizeof(configFileName)+1 );
add: config_filename = shm_malloc( strlen(configFileName)+1 );
context: AAAReturnCode AAAOpen(char *configFileName){	str peer;	void* shm_mempool;	FILE* cfg_file;	/* check if the lib is already init */	if (is_lib_init) {		LOG(L_ERR,"ERROR:AAAOpen: library already initialized!!\n");		return AAA_ERR_ALREADY_INIT;	}	/* init mallocs */	shm_mempool=malloc(shm_mem_size);	if (shm_mempool==0){		LOG(L_CRIT,"ERROR:AAAOpen: intial malloc failed\n");		return AAA_ERR_NOMEM;	};	if (shm_mem_init_mallocs(shm_mempool, shm_mem_size)<0){		LOG(L_CRIT,"ERROR:AAAOpen: could not intialize shm. mallocs\n");		return AAA_ERR_NOMEM;	};	/* read the config file */	if ((cfg_file=fopen(configFileName, "r"))==0){		LOG(L_CRIT,"ERROR:AAAOpen: reading config file: %s\n",strerror(errno));		goto error_config;	}	if (cfg_parse_stream(cfg_file)!=0){		fclose(cfg_file);		LOG(L_CRIT,"ERROR:AAAOpen: reading config file(%s)\n", configFileName);		goto error_config;	}	fclose(cfg_file);	/* save the name of the config file  */	config_filename = shm_malloc( sizeof(configFileName)+1 );	if (!config_filename) {		LOG(L_CRIT, "ERROR:AAAOpen: cannot allocate memory!\n");		goto error_config;	}	strcpy( config_filename, configFileName);	/* init the random number geberator */	init_random_generator();	printf("after config read: debug=%d, log_stderr=%d\n", debug, log_stderr);	printf("identity=%.*s, fqdn=%.*s realm=%.*s\n",				aaa_identity.len, aaa_identity.s,				aaa_fqdn.len, aaa_fqdn.s,				aaa_realm.len, aaa_realm.s			);		if ((aaa_identity.s==0)||(aaa_fqdn.s==0)||(aaa_realm.s==0)){		LOG(L_CRIT, "critical config parameters missing --exiting\n");		goto error_config;	}	/* init the hash_table */	if ( (hash_table=build_htable())==0)		goto mem_error;	/* init the shared mutexes */	if ( (init_shared_mutexes())==0)		goto mem_error;	/* init the transaction manager */	if (init_trans_manager()==-1)		goto mem_error;	/* init the session manager */	if (init_session_manager()==-1)		goto mem_error;	/* init the message manager */	if (init_msg_manager()==-1)		goto mem_error;	/* init peer manager */	if (init_peer_manager( )==-1)		goto mem_error;	/* init the socket layer */	if (init_tcp_shell()==-1)		goto mem_error;	/* start the timer */	init_timer();	/* add the peers from config file */	//..................	peer.s = "ugluk.mobis.fokus.gmd.de";	peer.len = strlen(peer.s);	add_peer( peer_table, &peer, 7, 1812);	/* start the tcp shell */	start_tcp_accept();	/* finally DONE */	is_lib_init = 1;	return AAA_ERR_SUCCESS;mem_error:	LOG(L_ERR,"ERROR:AAAOpen: AAA library initialization failed!\n");	AAAClose();	return AAA_ERR_NOMEM;error_config:		return  AAA_ERR_CONFIG;}