Look for the config file before the FS gets unshared.
[util-vserver-pl.git] / src / netns.c
index c0ccc90..8f0c598 100644 (file)
@@ -29,11 +29,11 @@ get_space_flag(xid_t xid) {
     if (!ctx_space_file)
         return 0;
 
-    sprintf(ctx_space_file,VSERVERCONF SPACE_FILE "%s", slice_user->pw_name);
+    sprintf(ctx_space_file,VSERVERCONF "%s" SPACE_FILE, slice_user->pw_name);
 
     if (access(ctx_space_file, F_OK)==0)
         space_flag |= CLONE_NEWNET;
 
-    free(ctx_space_dir);
+    free(ctx_space_file);
     return space_flag;
 }