summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 {