Skip to content

Commit

Permalink
Merge pull request #53 from DICL/fix-dfsput
Browse files Browse the repository at this point in the history
dynamic allocation error is fixed
  • Loading branch information
vicentebolea committed Mar 15, 2016
2 parents 97be0f3 + b37b748 commit 7f2530d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/fs/dfsput.cc
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ int main(int argc, char* argv[])
{
uint32_t BLOCK_SIZE = con.settings.get<int>("filesystem.block");
uint32_t NUM_SERVERS = con.settings.get<vector<string>>("network.nodes").size();
char chunk [BLOCK_SIZE];
char* chunk = new char[BLOCK_SIZE];
for(int i=1; i<argc; i++)
{
string file_name = argv[i];
Expand Down Expand Up @@ -230,6 +230,7 @@ int main(int argc, char* argv[])
delete socket;
myfile.close();
}
delete[] chunk;
}
return 0;
}

0 comments on commit 7f2530d

Please sign in to comment.