Fixes memory allocation

Fixes memory allocation: malloc(sizeof(char)*info.size);
Merge pull request #5 from justartem/patch-5

Fixes memory allocation