summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBastian Wissler2009-04-02 17:57:07 +0200
committerBastian Wissler2009-04-02 17:57:07 +0200
commite8f5f552a1fad9493bcdcd3c4ddbcf1d106b324e (patch)
treea54224d3fe2c7b8a1de601ce34a329af5eea9754
parentvmchoooser source + libs: (diff)
downloadvmchooser-e8f5f552a1fad9493bcdcd3c4ddbcf1d106b324e.tar.gz
vmchooser-e8f5f552a1fad9493bcdcd3c4ddbcf1d106b324e.tar.xz
vmchooser-e8f5f552a1fad9493bcdcd3c4ddbcf1d106b324e.zip
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
-rw-r--r--vmchooser/userSession.cxx5
1 files changed, 1 insertions, 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 {