From e8f5f552a1fad9493bcdcd3c4ddbcf1d106b324e Mon Sep 17 00:00:00 2001 From: Bastian Wissler Date: Thu, 2 Apr 2009 15:57:07 +0000 Subject: vmchooser binary: - added fix suggested by Klaus - thx - new version for 5.0-branch and trunk git-svn-id: http://svn.openslx.org/svn/openslx/openslx-src-tools/vmchooser/trunk@2792 95ad53e4-c205-0410-b2fa-d234c58c8868 --- vmchooser/userSession.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/vmchooser/userSession.cxx b/vmchooser/userSession.cxx index aa53fd5..a0d118c 100644 --- a/vmchooser/userSession.cxx +++ b/vmchooser/userSession.cxx @@ -77,12 +77,9 @@ char* readSession() { string sessname; getline(fin,sessname); - char* blub = (char*) malloc(sessname.size()+1); - strncpy(blub,sessname.c_str(),sessname.size()+1); + char* blub = strdup(sessname.c_str()); if(!sessname.empty()) { - // blub has to be freed ;-) - // but this is not very important here - or is it? return blub; } else { -- cgit v1.2.3-55-g7522